[Httpunit-commit] SF.net SVN: httpunit: [916] trunk/httpunit/test/com/meterware/httpunit/ FormParam
Brought to you by:
russgold
|
From: <wol...@us...> - 2008-04-15 16:56:12
|
Revision: 916
http://httpunit.svn.sourceforge.net/httpunit/?rev=916&view=rev
Author: wolfgang_fahl
Date: 2008-04-15 09:55:53 -0700 (Tue, 15 Apr 2008)
Log Message:
-----------
test for Bug Report 1937946 added (but disabled for HttpUnitSuite since it needs index.html on localhost
convenience addition to be able to test this bug report on a Mac
Modified Paths:
--------------
trunk/httpunit/test/com/meterware/httpunit/FormParametersTest.java
Modified: trunk/httpunit/test/com/meterware/httpunit/FormParametersTest.java
===================================================================
--- trunk/httpunit/test/com/meterware/httpunit/FormParametersTest.java 2008-04-14 19:39:44 UTC (rev 915)
+++ trunk/httpunit/test/com/meterware/httpunit/FormParametersTest.java 2008-04-15 16:55:53 UTC (rev 916)
@@ -571,6 +571,35 @@
assertEquals( "File from unvalidated request", file.getAbsolutePath(), wr.getParameterValues( "File" )[0] );
}
+
+
+ /**
+ * test for BugReport 1937946 (different result on Mac than on other platforms
+ * @throws Exception
+ * to activate test download
+ * https://sourceforge.net/tracker/download.php?group_id=6550&atid=106550&file_id=274135&aid=1937946
+ * and copy as index.html (or whatever - change url if necessary) to local host
+ * tested with real browser so deactivated for HttpUnitSuite
+ */
+ public void xtestBugReport1937946Mac() throws Exception {
+ String url = "http://localhost/index.html";
+ WebConversation conversation = new WebConversation();
+ WebRequest request = new GetMethodWebRequest( url );
+ WebResponse response = conversation.getResponse( request );
+
+ HttpUnitOptions.setExceptionsThrownOnScriptError( false );
+
+ assertNotNull( "Kein Response von URL '" + url + "'.", response );
+ System.out.println( "\nResponse von URL '" + url + "'." );
+
+ WebForm form = response.getFormWithID( "suchen" );
+ String param[] = form.getParameterNames();
+
+ for (int i = 0; i < param.length; i++) {
+ System.err.println(param[i]);
+ }
+ assertTrue("expecting 5 params but found "+param.length,param.length==5);
+ }
//---------------------------------------------- private members ------------------------------------------------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|