Loading browser/components/originattributes/test/browser/browser.ini +1 −0 Original line number Diff line number Diff line Loading @@ -68,3 +68,4 @@ support-files = [browser_sharedworker.js] [browser_httpauth.js] [browser_clientAuth.js] [browser_cacheAPI.js] browser/components/originattributes/test/browser/browser_cacheAPI.js 0 → 100644 +18 −0 Original line number Diff line number Diff line const requestURL = "https://test1.example.com"; function getResult(aBrowser) { return ContentTask.spawn(aBrowser, requestURL, function* (url) { let cache = yield content.caches.open("TEST_CACHE"); let response = yield cache.match(url); if (response) { return response.statusText; } let result = Math.random().toString(); response = new content.Response("", { statusText: result }); yield cache.put(url, response); return result; }); } IsolationTestTools.runTests("https://test2.example.com", getResult, null, null, false, /* aUseHttps */ true); browser/components/originattributes/test/browser/head.js +5 −2 Original line number Diff line number Diff line Loading @@ -279,7 +279,7 @@ this.IsolationTestTools = { * An optional boolean to ensure we get results before the next tab is opened. */ runTests(aURL, aGetResultFuncs, aCompareResultFunc, aBeforeFunc, aGetResultImmediately) { aGetResultImmediately, aUseHttps) { let pageURL; let firstFrameSetting; let secondFrameSetting; Loading @@ -301,7 +301,10 @@ this.IsolationTestTools = { aGetResultFuncs = [aGetResultFuncs]; } let tabSettings = [ let tabSettings = aUseHttps ? [ { firstPartyDomain: "https://example.com", userContextId: 1}, { firstPartyDomain: "https://example.org", userContextId: 2} ] : [ { firstPartyDomain: "http://example.com", userContextId: 1}, { firstPartyDomain: "http://example.org", userContextId: 2} ]; Loading Loading
browser/components/originattributes/test/browser/browser.ini +1 −0 Original line number Diff line number Diff line Loading @@ -68,3 +68,4 @@ support-files = [browser_sharedworker.js] [browser_httpauth.js] [browser_clientAuth.js] [browser_cacheAPI.js]
browser/components/originattributes/test/browser/browser_cacheAPI.js 0 → 100644 +18 −0 Original line number Diff line number Diff line const requestURL = "https://test1.example.com"; function getResult(aBrowser) { return ContentTask.spawn(aBrowser, requestURL, function* (url) { let cache = yield content.caches.open("TEST_CACHE"); let response = yield cache.match(url); if (response) { return response.statusText; } let result = Math.random().toString(); response = new content.Response("", { statusText: result }); yield cache.put(url, response); return result; }); } IsolationTestTools.runTests("https://test2.example.com", getResult, null, null, false, /* aUseHttps */ true);
browser/components/originattributes/test/browser/head.js +5 −2 Original line number Diff line number Diff line Loading @@ -279,7 +279,7 @@ this.IsolationTestTools = { * An optional boolean to ensure we get results before the next tab is opened. */ runTests(aURL, aGetResultFuncs, aCompareResultFunc, aBeforeFunc, aGetResultImmediately) { aGetResultImmediately, aUseHttps) { let pageURL; let firstFrameSetting; let secondFrameSetting; Loading @@ -301,7 +301,10 @@ this.IsolationTestTools = { aGetResultFuncs = [aGetResultFuncs]; } let tabSettings = [ let tabSettings = aUseHttps ? [ { firstPartyDomain: "https://example.com", userContextId: 1}, { firstPartyDomain: "https://example.org", userContextId: 2} ] : [ { firstPartyDomain: "http://example.com", userContextId: 1}, { firstPartyDomain: "http://example.org", userContextId: 2} ]; Loading