Bug 1224579 - Allow leading dot in domain in cookies.set. r=billm
authorTom Schuster <evilpies@gmail.com>
Mon, 21 Dec 2015 07:14:00 -0800
changeset 278245 e25c5bf2da7411a58e2a6e5cb37bf67be23052ff
parent 278017 8079161123840602784e73dfaa61d1946abfc07a
child 278246 1f682dc05790a8ab1cdda60dad61e511ba611629
push id29845
push userryanvm@gmail.com
push dateSun, 03 Jan 2016 03:17:39 +0000
treeherdermozilla-central@d7a0ad85d9fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs1224579
milestone46.0a1
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
Bug 1224579 - Allow leading dot in domain in cookies.set. r=billm
toolkit/components/extensions/test/mochitest/test_ext_cookies.html
--- a/toolkit/components/extensions/test/mochitest/test_ext_cookies.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_cookies.html
@@ -83,16 +83,22 @@ function backgroundScript() {
     return get({url: TEST_URL, name: "name1"});
   }).then(cookie => {
     browser.test.assertEq(cookie, null);
     return getAllCookieStores();
   }).then(stores => {
     browser.test.assertEq(stores.length, 1);
     browser.test.assertEq(stores[0].id, "firefox-default");
     browser.test.assertEq(stores[0].tabIds.length, 0); // Todo: Implement this.
+    return set({url: TEST_URL, name: "name2", domain: ".example.org", expirationDate: THE_FUTURE});
+  }).then(cookie => {
+    browser.test.assertEq(cookie.hostOnly, false, "not a hostOnly cookie");
+    return remove({url: TEST_URL, name: "name2"});
+  }).then(details => {
+    assertExpected(details, {url: TEST_URL, name: "name2", storeId: "firefox-default"});
   }).then(() => {
     browser.test.notifyPass("cookies");
   });
 }
 
 let extensionData = {
   background: "(" + backgroundScript.toString() + ")()",
   manifest: {