mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Backed out changeset 0303be04c579 (bug 1312541) for es lint failures
This commit is contained in:
parent
a4f025cea7
commit
3bba80dcca
@ -30,7 +30,6 @@ support-files =
|
||||
worker_blobify.js
|
||||
worker_deblobify.js
|
||||
|
||||
[browser_cookieIsolation.js]
|
||||
[browser_favicon_firstParty.js]
|
||||
[browser_favicon_userContextId.js]
|
||||
[browser_firstPartyIsolation.js]
|
||||
|
@ -1,28 +0,0 @@
|
||||
/**
|
||||
* Bug 1312541 - A test case for document.cookie isolation.
|
||||
*/
|
||||
|
||||
const TEST_PAGE = "http://mochi.test:8888/browser/browser/components/" +
|
||||
"originattributes/test/browser/file_firstPartyBasic.html";
|
||||
|
||||
// Use a random key so we don't access it in later tests.
|
||||
const key = "key" + Math.random().toString();
|
||||
const re = new RegExp(key + "=([0-9\.]+)");
|
||||
|
||||
// Define the testing function
|
||||
function* doTest(aBrowser) {
|
||||
return yield ContentTask.spawn(aBrowser, {key, re},
|
||||
function ({key, re}) {
|
||||
let result = re.exec(content.document.cookie);
|
||||
if (result) {
|
||||
return result[1];
|
||||
} else {
|
||||
// No value is found, so we create one.
|
||||
let value = Math.random().toString();
|
||||
content.document.cookie = key + "=" + value;
|
||||
return value;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
IsolationTestTools.runTests(TEST_PAGE, doTest);
|
Loading…
Reference in New Issue
Block a user