[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit/javascript ScriptingTest.java,1.5,1.6
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-08-05 18:58:47
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript In directory usw-pr-cvs1:/tmp/cvs-serv24279/test/com/meterware/httpunit/javascript Modified Files: ScriptingTest.java Log Message: Initiate JavaScript automatically Index: ScriptingTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- ScriptingTest.java 5 Aug 2002 17:34:25 -0000 1.5 +++ ScriptingTest.java 5 Aug 2002 18:58:43 -0000 1.6 @@ -56,7 +56,6 @@ "<body onLoad='alert(\"Ouch!\")'></body>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertNotNull( "No alert detected", response.getNextAlert() ); assertEquals( "Alert message", "Ouch!", response.popNextAlert() ); assertNull( "Alert should have been removed", response.getNextAlert() ); @@ -72,7 +71,6 @@ "<body onLoad='sayCheese()'></body>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertEquals( "Alert message", "Cheese!", response.popNextAlert() ); } @@ -82,7 +80,6 @@ "<body onLoad='alert(\"Window title is \" + document.title)'></body>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertEquals( "Alert message", "Window title is Amazing!", response.popNextAlert() ); } @@ -102,7 +99,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertEquals( "Alert message", "found 1 form(s)", response.popNextAlert() ); assertEquals( "Alert message", "found form 'realform'", response.popNextAlert() ); assertEquals( "Alert message", "did not find form 'noform'", response.popNextAlert() ); @@ -127,7 +123,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertEquals( "Alert message", "found 2 link(s)", response.popNextAlert() ); assertEquals( "Alert message", "found link 'reallink'", response.popNextAlert() ); assertEquals( "Alert message", "did not find link 'nolink'", response.popNextAlert() ); @@ -142,7 +137,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); WebForm form = response.getFormWithName( "realform" ); assertEquals( "color parameter value", "green", form.getParameterValue( "color" ) ); } @@ -156,7 +150,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); WebForm form = response.getFormWithName( "realform" ); WebLink link = response.getLinks()[0]; assertEquals( "initial parameter value", "blue", form.getParameterValue( "color" ) ); @@ -183,7 +176,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertEquals( "Alert message", getHostPath() + "/demo.html", response.popNextAlert() ); assertEquals( "Alert message", getHostPath() + "/guide.html", response.popNextAlert() ); assertEquals( "Alert message", getHostPath() + "/search.html", response.popNextAlert() ); @@ -209,7 +201,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); assertEquals( "Alert message", "found 2 images(s)", response.popNextAlert() ); assertEquals( "Alert message", "found image 'realimage'", response.popNextAlert() ); assertEquals( "Alert message", "did not find image 'noimage'", response.popNextAlert() ); @@ -225,7 +216,6 @@ "</body></html>" ); WebConversation wc = new WebConversation(); WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); - JavaScript.run( response ); WebImage image = response.getImageWithName( "theImage" ); WebLink link = response.getLinks()[0]; assertEquals( "initial image source", "initial.gif", image.getSource() ); |