[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit HTMLPage.java,1.22,1.23
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-01-10 18:22:32
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv20754/src/com/meterware/httpunit
Modified Files:
HTMLPage.java
Log Message:
Now ignoring non-JavaScript scripts
Index: HTMLPage.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/HTMLPage.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- HTMLPage.java 30 Dec 2002 21:46:54 -0000 1.22
+++ HTMLPage.java 10 Jan 2003 18:21:44 -0000 1.23
@@ -80,6 +80,8 @@
ArrayList scripts = new ArrayList();
for (int i = 0; i < nl.getLength(); i++) {
Node scriptNode = nl.item(i);
+ String language = NodeUtils.getNodeAttribute( scriptNode, "language", null );
+ if (language != null && !language.startsWith( "JavaScript ")) continue;
String scriptLocation = NodeUtils.getNodeAttribute( scriptNode, "src", null );
if (scriptLocation == null) {
scripts.add( NodeUtils.asText( scriptNode.getChildNodes() ) );
|