Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 9 - Tests for DOM Cache and cookie settings changing, r=Ehsan
☠☠ backed out by 66a4a5cb3fc7 ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Wed, 27 Feb 2019 19:57:27 +0000
changeset 461522 38e802661b143173e5f1a3606a28faab480b089d
parent 461521 d02e3f436390ec69c44c3bd09ab1fe81489701a4
child 461523 6a8401de32379f23a5544a7e0b5b1b16916fd581
push id79173
push useramarchesini@mozilla.com
push dateWed, 27 Feb 2019 20:36:38 +0000
treeherderautoland@009e7457b990 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersEhsan
bugs1525245
milestone67.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 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 9 - Tests for DOM Cache and cookie settings changing, r=Ehsan Differential Revision: https://phabricator.services.mozilla.com/D18957
netwerk/cookie/test/browser/browser.ini
netwerk/cookie/test/browser/browser_domCache.js
netwerk/cookie/test/browser/head.js
--- a/netwerk/cookie/test/browser/browser.ini
+++ b/netwerk/cookie/test/browser/browser.ini
@@ -1,12 +1,13 @@
 [DEFAULT]
 support-files =
   file_empty.html
   file_empty.js
   head.js
 
 [browser_broadcastChannel.js]
+[browser_domCache.js]
 [browser_indexedDB.js]
 [browser_originattributes.js]
 [browser_storage.js]
 [browser_serviceWorker.js]
 [browser_sharedWorker.js]
new file mode 100644
--- /dev/null
+++ b/netwerk/cookie/test/browser/browser_domCache.js
@@ -0,0 +1,13 @@
+CookiePolicyHelper.runTest("DOM Cache", {
+  cookieJarAccessAllowed: async _ => {
+    await content.caches.open("wow").then(
+      _ => { ok(true, "DOM Cache can be used!"); },
+      _ => { ok(false, "DOM Cache can be used!"); });
+  },
+
+  cookieJarAccessDenied: async _ => {
+    await content.caches.open("wow").then(
+      _ => { ok(false, "DOM Cache cannot be used!"); },
+      _ => { ok(true, "DOM Cache cannot be used!"); });
+  },
+});
--- a/netwerk/cookie/test/browser/head.js
+++ b/netwerk/cookie/test/browser/head.js
@@ -1,16 +1,16 @@
 const BEHAVIOR_ACCEPT = Ci.nsICookieService.BEHAVIOR_ACCEPT;
 const BEHAVIOR_REJECT = Ci.nsICookieService.BEHAVIOR_REJECT;
 
 const PERM_DEFAULT = Ci.nsICookiePermission.ACCESS_DEFAULT;
 const PERM_ALLOW = Ci.nsICookiePermission.ACCESS_ALLOW;
 const PERM_DENY = Ci.nsICookiePermission.ACCESS_DENY;
 
-const TEST_DOMAIN = "http://example.net/";
+const TEST_DOMAIN = "https://example.com/";
 const TEST_PATH = "browser/netwerk/cookie/test/browser/";
 const TEST_TOP_PAGE = TEST_DOMAIN + TEST_PATH + "file_empty.html";
 
 // Helper to eval() provided cookieJarAccessAllowed and cookieJarAccessDenied
 // toString()ed optionally async function in freshly created tabs with
 // BEHAVIOR_ACCEPT and BEHAVIOR_REJECT configured, respectively, in a number of
 // permutations. This includes verifying that changing the permission while the
 // page is open still results in the state of the permission when the