[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit/javascript NekoEnhancedScriptingTest.jav
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-02-23 20:03:43
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv32315/test/com/meterware/httpunit/javascript
Modified Files:
NekoEnhancedScriptingTest.java
Log Message:
Ignore document.close() while processing immediate script
Index: NekoEnhancedScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/NekoEnhancedScriptingTest.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- NekoEnhancedScriptingTest.java 10 Jan 2003 18:21:48 -0000 1.3
+++ NekoEnhancedScriptingTest.java 23 Feb 2003 20:03:39 -0000 1.4
@@ -65,6 +65,24 @@
}
+ public void testEmbeddedDocumentWriteWithClose() throws Exception {
+ defineResource( "OnCommand.html", "<html><head><title>something</title></head>" +
+ "<body>" +
+ "<script language='JavaScript'>" +
+ "document.write( '<a id=here href=about:blank>' );" +
+ "document.writeln( document.title );" +
+ "document.write( '</a>' );" +
+ "document.close();" +
+ "</script>" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
+ WebLink link = response.getLinkWithID( "here" );
+ assertNotNull( "The link was not found", link );
+ assertEquals( "Link contents", "something", link.asText() );
+ }
+
+
public void testUnknownScript() throws Exception {
defineWebPage( "FunkyScript",
"<SCRIPT>" +
|