[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit FormSubmitTest.java,1.16,1.17
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-03-25 05:07:31
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv8353/test/com/meterware/httpunit
Modified Files:
FormSubmitTest.java
Log Message:
Send position of image button even with no value specified
Index: FormSubmitTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/FormSubmitTest.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- FormSubmitTest.java 14 Mar 2002 22:18:26 -0000 1.16
+++ FormSubmitTest.java 25 Mar 2002 05:07:29 -0000 1.17
@@ -28,6 +28,7 @@
import java.util.Enumeration;
import java.util.StringTokenizer;
import java.util.Vector;
+import java.io.ByteArrayOutputStream;
/**
@@ -206,6 +207,19 @@
WebForm form = page.getForms()[0];
WebRequest request = form.getRequest();
assertEquals( "Query", getHostPath() + "/ask?age=12&update=name&update.x=0&update.y=0", request.getURL().toExternalForm() );
+ }
+
+
+ public void testImageButtonNoValue() throws Exception {
+ defineWebPage( "Default", "<form name='login' method='get' action='ask'>" +
+ "<input type='text' name='email' value='bread'>" +
+ "<input type='image' name='login' src='../../se/images/buttons/login.gif'" +
+ " Alt='OK' border='0'>" +
+ "</form>" );
+ WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" );
+ WebForm form = page.getForms()[0];
+ WebRequest request = form.getRequest();
+ assertEquals( "Query", getHostPath() + "/ask?email=bread&login.x=0&login.y=0", request.getURL().toExternalForm() );
}
|