[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit/javascript ScriptingTest.java,1.49,1.50
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-03-12 15:39:51
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv22085/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
Verify external scripting
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- ScriptingTest.java 5 Feb 2003 16:07:40 -0000 1.49
+++ ScriptingTest.java 12 Mar 2003 15:39:46 -0000 1.50
@@ -398,7 +398,6 @@
"<a href='#' onMouseOver=\"window.location='" + getHostPath() + "/Target.html';\">go</a>" +
"<a href='#' onMouseOver=\"document.location='" + getHostPath() + "/Target.html';\">go</a>" +
"<a href='#' onMouseOver=\"document.location.replace('" + getHostPath() + "/Target.html');\">go</a>" +
- "<a href='#' onMouseOver=\"window.location.href='" + getHostPath() + "/Target.html';\">go</a>" +
"</body>" );
WebConversation wc = new WebConversation();
WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" );
@@ -420,7 +419,7 @@
assertEquals( "4th page", "You made it!", wc.getCurrentPage().getText() );
response = wc.getResponse( getHostPath() + "/OnCommand.html" );
- response.getLinks()[3].mouseOver();
+ response.getScriptableObject().doEvent( "window.location.href='" + getHostPath() + "/Target.html'" );
assertEquals( "5th page URL", getHostPath() + "/Target.html", wc.getCurrentPage().getURL().toExternalForm() );
assertEquals( "5th page", "You made it!", wc.getCurrentPage().getText() );
}
|