[Httpunit-commit] SF.net SVN: httpunit:[1046] trunk/httpunit/test/com/meterware/httpunit/ cookies/C
Brought to you by:
russgold
|
From: <wol...@us...> - 2009-08-20 11:31:47
|
Revision: 1046
http://httpunit.svn.sourceforge.net/httpunit/?rev=1046&view=rev
Author: wolfgang_fahl
Date: 2009-08-20 11:31:40 +0000 (Thu, 20 Aug 2009)
Log Message:
-----------
test case for double quoted cookie problem pointed out by Mario V
Modified Paths:
--------------
trunk/httpunit/test/com/meterware/httpunit/cookies/CookieTest.java
Modified: trunk/httpunit/test/com/meterware/httpunit/cookies/CookieTest.java
===================================================================
--- trunk/httpunit/test/com/meterware/httpunit/cookies/CookieTest.java 2009-08-20 10:44:14 UTC (rev 1045)
+++ trunk/httpunit/test/com/meterware/httpunit/cookies/CookieTest.java 2009-08-20 11:31:40 UTC (rev 1046)
@@ -22,6 +22,7 @@
*******************************************************************************************************************/
import java.net.URL;
import java.net.MalformedURLException;
+import java.util.Collection;
import java.util.HashMap;
import junit.framework.TestCase;
@@ -76,6 +77,20 @@
assertEquals( "cookie 'PORTAL30_SSO_TEST' value", "X", jar.getCookieValue( "PORTAL30_SSO_TEST" ) );
assertEquals( "cookie 'SESSION_ID' value", "17585,Dzm5LzbRPnb95QkUyIX+7w5RDT7p6OLuOVZ91AMl4hsDATyZ1ej+FA==", jar.getCookieValue( "SESSION_ID" ) );
}
+
+ /***
+ * test for double quoted cookies suggested by Mario V
+ * disabled since it indeed fails - FIXME - we need a patch here
+ * @throws Exception
+ */
+ public void xtestDoubleQuoteCookies() throws Exception {
+ CookieJar jar = new CookieJar(
+ new TestSource( new URL( "http://www.meterware.com" ),
+ new String[] { "NewUniversalCookie=\"mmmmmmmmmmmmmmm==mmmmmmm mmmmmmm\"; Path=/"} ) );
+ Collection cookies = jar.getCookies();
+ assertTrue("There should only be one cookie but there are "+cookies.size(),cookies.size()==1);
+ assertEquals( "cookie 'NewUniversalCookie' value", "mmmmmmmmmmmmmmm==mmmmmmm mmmmmmm", jar.getCookieValue( "NewUniversalCookie" ) );
+ }
public void testCookieMatching() throws Exception {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|