[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit WebClientTest.java,1.9,1.10 WebFormTest.
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2002-10-24 13:28:59
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit
In directory usw-pr-cvs1:/tmp/cvs-serv28243/test/com/meterware/httpunit
Modified Files:
WebClientTest.java WebFormTest.java
Log Message:
Added support for document.write
Index: WebClientTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebClientTest.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- WebClientTest.java 17 Oct 2002 23:50:51 -0000 1.9
+++ WebClientTest.java 24 Oct 2002 13:28:55 -0000 1.10
@@ -54,11 +54,6 @@
super( name );
}
- public void testNothing() {
- new WebConversation(); // XXX delete me!!!
- }
-
-
public void testCookies() throws Exception {
String resourceName = "something/baking";
String resourceValue = "the desired content";
Index: WebFormTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/WebFormTest.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- WebFormTest.java 15 Oct 2002 01:07:29 -0000 1.27
+++ WebFormTest.java 24 Oct 2002 13:28:55 -0000 1.28
@@ -22,15 +22,11 @@
import com.meterware.pseudoserver.PseudoServlet;
import com.meterware.pseudoserver.WebResource;
-import java.net.URL;
import java.net.HttpURLConnection;
import junit.framework.Test;
-import junit.framework.TestCase;
import junit.framework.TestSuite;
-import java.util.Vector;
-
/**
* A test of the web form functionality.
@@ -214,7 +210,7 @@
}
- // XXX turn this back on when Tidy handles it properly
+ // XXX turn this back on when the parser handles it properly
public void notestNullTextValues() throws Exception {
defineWebPage( "Default", "<form method=POST action = \"/servlet/Login\">" +
"<Input name=\"secret\" type=\"hidden\" value=>" +
@@ -251,7 +247,6 @@
assertMatchingSet( "parameter names", new String[] { "name","sex" }, parameterNames );
assertEquals( "Default name", "", form.getParameterValue( "name" ) );
assertEquals( "Default sex", "female", form.getParameterValue( "sex" ) );
- WebRequest request = form.getRequest();
form.setParameter( "sex", "neuter" );
assertEquals( "New value for sex", "neuter", form.getParameterValue( "sex" ) );
@@ -363,8 +358,7 @@
WebResponse page = _wc.getResponse( getHostPath() + "/Default.html" );
WebForm form = page.getForms()[0];
- String[] parameterNames = form.getParameterNames();
- assertEquals( "inferred color default", "blue", form.getParameterValue( "colors" ) );
+ assertEquals( "inferred color default", "blue", form.getParameterValue( "colors" ) );
assertEquals( "inferred fish default", "red", form.getParameterValue( "fish" ) );
assertMatchingSet( "inferred media default", new String[0], form.getParameterValues( "media" ) );
@@ -439,7 +433,6 @@
"<input type=text name=name><input type=submit></form></body></html>" );
defineResource( "SayHello?speed=fast", new PseudoServlet() {
public WebResource getPostResponse() {
- String name = getParameter( "name" )[0];
WebResource result = new WebResource( "<html><body><table><tr><td>Hello, there" +
"</td></tr></table></body></html>" );
return result;
@@ -470,10 +463,7 @@
"<input type=text name=name><input type=submit></form></body></html>" );
defineResource( sessionID + "/SayHello", new PseudoServlet() {
public WebResource getPostResponse() {
- String name = getParameter( "name" )[0];
- WebResource result = new WebResource( "<html><body><table><tr><td>Hello, there" +
- "</td></tr></table></body></html>" );
- return result;
+ return new WebResource( "<html><body><table><tr><td>Hello, there</td></tr></table></body></html>" );
}
} );
|