[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit FormSubmitTest.java,1.17,1.18
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-06-17 18:43:18
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit In directory usw-pr-cvs1:/tmp/cvs-serv21557/test/com/meterware/httpunit Modified Files: FormSubmitTest.java Log Message: Add test for image button with no value Index: FormSubmitTest.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormSubmitTest.java,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- FormSubmitTest.java 25 Mar 2002 05:07:29 -0000 1.17 +++ FormSubmitTest.java 17 Jun 2002 18:43:15 -0000 1.18 @@ -249,6 +249,17 @@ } + public void testImageButtonNoValuePositionalSubmit() throws Exception { + defineWebPage( "Default", "<form method='GET' action='test.jsp'>" + + "<input type='image' src='image.gif' name='aButton'>" + + "</form>" ); + WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" ); + WebForm form = page.getForms()[0]; + WebRequest request = form.getRequest( form.getSubmitButton( "aButton" ), 20, 5 ); + assertEquals( getHostPath() + "/test.jsp?aButton.x=20&aButton.y=5", request.getURL().toExternalForm() ); + } + + public void testSubmitButtonAttributes() throws Exception { defineWebPage( "Default", "<form method=GET action = \"/ask\">" + "<Input type=text name=age value=12>" + |