[Httpunit-commit] CVS: httpunit/test/com/meterware/httpunit/javascript ScriptingTest.java,1.55,1.56
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-10-17 13:52:02
|
Update of /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript
In directory sc8-pr-cvs1:/tmp/cvs-serv6112/test/com/meterware/httpunit/javascript
Modified Files:
ScriptingTest.java
Log Message:
bug #823433: Document.cookie now defaults to empty string
Index: ScriptingTest.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/test/com/meterware/httpunit/javascript/ScriptingTest.java,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -r1.55 -r1.56
--- ScriptingTest.java 2 Oct 2003 02:43:47 -0000 1.55
+++ ScriptingTest.java 17 Oct 2003 13:44:58 -0000 1.56
@@ -607,6 +607,21 @@
}
+ public void testReadNoCookie() throws Exception {
+ defineResource( "OnCommand.html", "<html><head><script language='JavaScript'>" +
+ "function viewCookies() { \n" +
+ " alert( 'cookies: ' + document.cookie );\n" +
+ "}" +
+ "</script></head>\n" +
+ "<body onLoad='viewCookies()'>\n" +
+ "</body></html>" );
+ WebConversation wc = new WebConversation();
+ wc.getResponse( getHostPath() + "/OnCommand.html" );
+ assertEquals( "Alert message 1", "cookies: ", wc.popNextAlert() );
+ assertNull( "Alert should have been removed", wc.getNextAlert() );
+ }
+
+
public void testSimpleSetCookie() throws Exception {
defineResource( "OnCommand.html", "<html><head></head>\n" +
"<body onLoad='document.cookie=\"color=red;path=/\"'>\n" +
|