[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit/javascript ScriptingTest.java,1.6,1.7
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-08-05 19:42:57
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript In directory usw-pr-cvs1:/tmp/cvs-serv11224/test/com/meterware/httpunit/javascript Modified Files: ScriptingTest.java Log Message: Added support for checkbox.clicked property Index: ScriptingTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- ScriptingTest.java 5 Aug 2002 18:58:43 -0000 1.6 +++ ScriptingTest.java 5 Aug 2002 19:42:52 -0000 1.7 @@ -142,6 +142,24 @@ } + public void testCheckboxSetChecked() throws Exception { + defineResource( "OnCommand.html", "<html><head></head>" + + "<body>" + + "<form name='realform'><input type='checkbox' name='ready'></form>" + + "<a href='#' name='clear' onMouseOver=\"document.realform.ready.checked=false;\">clear</a>" + + "<a href='#' name='set' onMouseOver=\"document.realform.ready.checked=true;\">set</a>" + + "</body></html>" ); + WebConversation wc = new WebConversation(); + WebResponse response = wc.getResponse( getHostPath() + "/OnCommand.html" ); + WebForm form = response.getFormWithName( "realform" ); + assertEquals( "initial parameter value", null, form.getParameterValue( "ready" ) ); + response.getLinkWithName( "set" ).mouseOver(); + assertEquals( "changed parameter value", "on", form.getParameterValue( "ready" ) ); + response.getLinkWithName( "clear" ).mouseOver(); + assertEquals( "final parameter value", null, form.getParameterValue( "ready" ) ); + } + + public void testLinkMouseOverEvent() throws Exception { defineResource( "OnCommand.html", "<html><head></head>" + "<body>" + |