Backed out changeset b980d0cf9847 (bug 643051) because of consistent mochitest-1 failure
authorJonathan Kew <jfkthame@gmail.com>
Fri, 08 Apr 2011 20:29:18 -0700
changeset 67734 9409b0c8864f0dcd2bb4040e9c185d2806cda9cc
parent 67727 b980d0cf984767de8eba4a7e82c57195d44bfe60
child 67735 c04359d5920ff5e57a9a04e34e33290ff12d1ada
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs643051
milestone2.2a1pre
backs outb980d0cf984767de8eba4a7e82c57195d44bfe60
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset b980d0cf9847 (bug 643051) because of consistent mochitest-1 failure
content/html/content/test/Makefile.in
content/html/content/test/test_bug643051.html
netwerk/cookie/nsCookieService.cpp
netwerk/cookie/test/unit/test_bug643051.js
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -255,13 +255,12 @@ include $(topsrcdir)/config/rules.mk
 		test_bug619278.html \
 		test_bug622558.html \
 		test_bug622597.html \
 		test_bug636336.html \
 		test_bug630889.html \
 		test_bug610212.html \
 		test_bug633058.html \
 		test_bug641219.html \
-		test_bug643051.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
deleted file mode 100644
--- a/content/html/content/test/test_bug643051.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<html>
-<!--
-https://bugzilla.mozilla.org/show_bug.cgi?id=643051
--->
-<head>
-  <title>Test for Bug 643051</title>
-  <script type="application/javascript" src="/MochiKit/packed.js"></script>
-  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
-</head>
-<body>
-<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=643051">Mozilla Bug 643051</a>
-<p id="display"></p>
-<div id="content" style="display: none">
-  
-</div>
-<pre id="test">
-<script type="application/javascript">
-
-/** Test for Bug 643051 **/
-document.cookie = "foo=; expires=Thu, 01-Jan-1970 00:00:01 GMT";  // clear cookie
-document.cookie = "foo2=; expires=Thu, 01-Jan-1970 00:00:01 GMT";  // clear cookie
-document.cookie = "foo3=; expires=Thu, 01-Jan-1970 00:00:01 GMT";  // clear cookie
-
-// single cookie, should work
-document.cookie = "foo=bar";
-is(document.cookie, "foo=bar", "Can't read stored cookie!");
-
-document.cookie = "foo2=bar\nfoo3=bar";
-is(document.cookie, "foo=bar; foo2=bar", "Wrong cookie value");
-
-document.cookie = "foo2=baz; foo3=bar";
-is(document.cookie, "foo=bar; foo2=baz", "Wrong cookie value");
-
-</script>
-</pre>
-</body>
-</html>
--- a/netwerk/cookie/nsCookieService.cpp
+++ b/netwerk/cookie/nsCookieService.cpp
@@ -1545,21 +1545,17 @@ nsCookieService::SetCookieStringInternal
     serverTime = tempServerTime / PR_USEC_PER_SEC;
   } else {
     serverTime = PR_Now() / PR_USEC_PER_SEC;
   }
 
   // process each cookie in the header
   nsDependentCString cookieHeader(aCookieHeader);
   while (SetCookieInternal(aHostURI, baseDomain, requireHostMatch,
-                           cookieStatus, cookieHeader, serverTime, aFromHttp)) {
-    // document.cookie can only set one cookie at a time
-    if (!aFromHttp)
-      break;
-  }
+                           cookieStatus, cookieHeader, serverTime, aFromHttp));
 }
 
 // notify observers that a cookie was rejected due to the users' prefs.
 void
 nsCookieService::NotifyRejected(nsIURI *aHostURI)
 {
   if (mObserverService)
     mObserverService->NotifyObservers(aHostURI, "cookie-rejected", nsnull);
deleted file mode 100644
--- a/netwerk/cookie/test/unit/test_bug643051.js
+++ /dev/null
@@ -1,25 +0,0 @@
-const Cc = Components.classes;
-const Ci = Components.interfaces;
-
-Components.utils.import("resource://gre/modules/NetUtil.jsm");
-
-function run_test() {
-  let cs = Cc["@mozilla.org/cookieService;1"].getService(Ci.nsICookieService);
-
-  let uri = NetUtil.newURI("http://example.org/");
-
-  let set = "foo=bar\nbaz=foo";
-  let expected = "foo=bar; baz=foo";
-  cs.setCookieStringFromHttp(uri, null, null, set, null, null);
-
-  let actual = cs.getCookieStringFromHttp(uri, null, null);
-  do_check_eq(actual, expected);
-
-  uri = NetUtil.newURI("http://example.com/");
-  cs.setCookieString(uri, null, set, null);
-
-  expected = "foo=bar";
-  actual = cs.getCookieString(uri, null, null);
-  do_check_eq(actual, expected);
-}
-