Bug 1525245 - Stabilize cookiePolicy/cookiePermission for live documents - part 9 - Tests for DOM Cache and cookie settings changing, r=Ehsan
☠☠ backed out by bc51c190590a ☠ ☠
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 26 Feb 2019 17:38:23 +0000
changeset 461226 d3e99dd3fc32b95a1f82dcca9d62566f220b4378
parent 461225 a565014fdd8dadda3e6f4280646b9c6c9b1841eb
child 461227 4cde0e38ada8218b273caa8ea90eae0307f9a589
push id79050
push useramarchesini@mozilla.com
push dateTue, 26 Feb 2019 19:00:07 +0000
treeherderautoland@1dcb31a1d5be [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