mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Backed out 10 changesets (bug 1928672, bug 1922020) for causing bc failures @browser_permissionPropagation.js. CLOSED TREE
Backed out changeset 48e75896365c (bug 1928672) Backed out changeset efa4047d526e (bug 1922020) Backed out changeset 3df5f4781f39 (bug 1922020) Backed out changeset 23e201efd3b8 (bug 1922020) Backed out changeset 4c05fa56cf47 (bug 1922020) Backed out changeset 43f97ae7eb6f (bug 1922020) Backed out changeset 5e14c27894de (bug 1922020) Backed out changeset cf506f71a542 (bug 1922020) Backed out changeset e034708dee92 (bug 1922020) Backed out changeset 787a649b70b8 (bug 1922020)
This commit is contained in:
parent
87f02a37aa
commit
4373312425
@ -369,10 +369,6 @@ add_task(async function testCookiesSubViewAllowedHeuristic() {
|
||||
TPC_PREF,
|
||||
Ci.nsICookieService.BEHAVIOR_REJECT_TRACKER
|
||||
);
|
||||
Services.prefs.setBoolPref(
|
||||
"privacy.restrict3rdpartystorage.heuristic.window_open",
|
||||
true
|
||||
);
|
||||
let principal =
|
||||
Services.scriptSecurityManager.createContentPrincipalFromOrigin(
|
||||
// eslint-disable-next-line @microsoft/sdl/no-insecure-url
|
||||
|
@ -21,7 +21,6 @@
|
||||
}
|
||||
|
||||
async function startTest(aTestFun) {
|
||||
await SimpleTest.enableLegacyUnpartitionedStorage();
|
||||
let bc = new BroadcastChannel("form_restoration");
|
||||
|
||||
let promise = waitForMessage(bc);
|
||||
|
@ -253,7 +253,7 @@ function grabFileUsageAndContinueHandler(request) {
|
||||
|
||||
function getCurrentUsage(usageHandler) {
|
||||
let qms = SpecialPowers.Services.qms;
|
||||
let principal = SpecialPowers.wrap(document).effectiveStoragePrincipal;
|
||||
let principal = SpecialPowers.wrap(document).nodePrincipal;
|
||||
let cb = SpecialPowers.wrapCallback(usageHandler);
|
||||
qms.getUsageForPrincipal(principal, cb);
|
||||
}
|
||||
|
@ -81,7 +81,7 @@ function runInSandbox(sandbox, testFunc) {
|
||||
}
|
||||
|
||||
// Use the window principal for the sandbox; location.origin is not sufficient.
|
||||
var sb = new SpecialPowers.Cu.Sandbox(SpecialPowers.wrap(window.document).effectiveStoragePrincipal,
|
||||
var sb = new SpecialPowers.Cu.Sandbox(window,
|
||||
{ wantGlobalProperties: ["indexedDB"] });
|
||||
|
||||
sb.ok = SpecialPowers.Cu.exportFunction(ok, sb);
|
||||
|
@ -61,26 +61,13 @@ if (self.Notification) {
|
||||
// store notification in test context
|
||||
this.notification = notification;
|
||||
|
||||
if (self.location.search == "?xorigin") {
|
||||
notification.onerror = function () {
|
||||
ok(true, "onshow handler should be called");
|
||||
done();
|
||||
};
|
||||
} else {
|
||||
notification.onshow = function () {
|
||||
ok(true, "onshow handler should be called");
|
||||
done();
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
function (done) {
|
||||
if (self.location.search == "?xorigin") {
|
||||
ok(true, "onclose handler can not be called in partitioned workers");
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
var notification = this.notification;
|
||||
|
||||
notification.onclose = function () {
|
||||
|
@ -50,28 +50,15 @@ if (self.Notification) {
|
||||
// store notification in test context
|
||||
this.notification = notification;
|
||||
|
||||
if (self.location.search == "?xorigin") {
|
||||
notification.onerror = function () {
|
||||
ok(true, "onshow handler should be called");
|
||||
done();
|
||||
};
|
||||
} else {
|
||||
notification.onshow = function () {
|
||||
ok(true, "onshow handler should be called");
|
||||
done();
|
||||
};
|
||||
}
|
||||
},
|
||||
|
||||
function (done) {
|
||||
var notification = this.notification;
|
||||
|
||||
if (self.location.search == "?xorigin") {
|
||||
ok(true, "onclose handler can not be called in partitioned workers");
|
||||
done();
|
||||
return;
|
||||
}
|
||||
|
||||
notification.onclose = function () {
|
||||
ok(true, "onclose handler should be called");
|
||||
done();
|
||||
|
@ -7,9 +7,7 @@ function is(a, b, message) {
|
||||
}
|
||||
|
||||
if (self.Notification) {
|
||||
var child = new Worker(
|
||||
"notification_worker_child-child.js" + self.location.search
|
||||
);
|
||||
var child = new Worker("notification_worker_child-child.js");
|
||||
child.onerror = function (e) {
|
||||
ok(false, "Error loading child worker " + e);
|
||||
postMessage({ type: "finish" });
|
||||
|
@ -20,11 +20,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=916893
|
||||
SimpleTest.requestFlakyTimeout("Mock alert service dispatches show and click events.");
|
||||
|
||||
async function runTest() {
|
||||
let workerPath = "notification_worker.js";
|
||||
if (isXOrigin) {
|
||||
workerPath += "?xorigin";
|
||||
}
|
||||
var w = new Worker(workerPath);
|
||||
var w = new Worker("notification_worker.js");
|
||||
w.onmessage = function(e) {
|
||||
if (e.data.type === 'finish') {
|
||||
SimpleTest.finish();
|
||||
|
@ -19,11 +19,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=916893
|
||||
<script type="text/javascript">
|
||||
SimpleTest.requestFlakyTimeout("Mock alert service dispatches show event.");
|
||||
async function runTest() {
|
||||
let workerPath = "notification_worker_child-parent.js";
|
||||
if (isXOrigin) {
|
||||
workerPath += "?xorigin";
|
||||
}
|
||||
var w = new Worker(workerPath);
|
||||
var w = new Worker("notification_worker_child-parent.js");
|
||||
w.onmessage = function(e) {
|
||||
if (e.data.type === 'finish') {
|
||||
SimpleTest.finish();
|
||||
|
@ -272,7 +272,7 @@ Result<PrincipalMetadata, nsresult> GetInfoFromWindow(
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aWindow);
|
||||
QM_TRY(OkIf(sop), Err(NS_ERROR_FAILURE));
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetEffectiveStoragePrincipal();
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
QM_TRY(OkIf(principal), Err(NS_ERROR_FAILURE));
|
||||
|
||||
return GetInfoFromPrincipal(principal);
|
||||
@ -311,7 +311,7 @@ Result<nsAutoCString, nsresult> GetOriginFromWindow(
|
||||
nsCOMPtr<nsIScriptObjectPrincipal> sop = do_QueryInterface(aWindow);
|
||||
QM_TRY(OkIf(sop), Err(NS_ERROR_FAILURE));
|
||||
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetEffectiveStoragePrincipal();
|
||||
nsCOMPtr<nsIPrincipal> principal = sop->GetPrincipal();
|
||||
QM_TRY(OkIf(principal), Err(NS_ERROR_FAILURE));
|
||||
|
||||
QM_TRY_RETURN(GetOriginFromPrincipal(principal));
|
||||
|
@ -7,7 +7,6 @@
|
||||
<script>
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SimpleTest.enableLegacyUnpartitionedStorage().then(() => {
|
||||
/**
|
||||
* - main page (this one) opens file_zoom_restore_bfcache.html
|
||||
* - file_zoom_restore_bfcache.html sends "handlePageShow" to main page
|
||||
@ -125,5 +124,4 @@ SimpleTest.enableLegacyUnpartitionedStorage().then(() => {
|
||||
SpecialPowers.pushPrefEnv({set: [["browser.zoom.siteSpecific", false]]}, () => {
|
||||
window.open('file_zoom_restore_bfcache.html', '_blank', 'noopener');
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
@ -8,7 +8,6 @@ support-files = [
|
||||
["test_document_cookie.html"]
|
||||
|
||||
["test_document_cookie_notification.html"]
|
||||
scheme = "https"
|
||||
|
||||
["test_fetch.html"]
|
||||
|
||||
|
@ -5,9 +5,7 @@ function handleRequest(aRequest, aResponse) {
|
||||
|
||||
aResponse.setHeader(
|
||||
"Set-Cookie",
|
||||
`${
|
||||
parts[0]
|
||||
}=foo; path=/; sameSite=none; secure; partitioned; expires=${new Date(
|
||||
`${parts[0]}=foo; path=/; sameSite=none; secure; expires=${new Date(
|
||||
parseInt(parts[2], 10)
|
||||
).toGMTString()}`,
|
||||
false
|
||||
|
@ -24,7 +24,7 @@ Listener.prototype = {
|
||||
}
|
||||
|
||||
const cl = new Listener();
|
||||
document.cookie = "a=" + Math.random() + "; Secure; Partitioned; SameSite=None";
|
||||
document.cookie = "a=" + Math.random();
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
</script>
|
||||
|
@ -33,12 +33,6 @@ function setupTest(uri, cookies, loads) {
|
||||
gExpectedCookies = cookies;
|
||||
gExpectedLoads = loads;
|
||||
|
||||
// If this is an xorigin test, the "oh=hai" cookie set by this frame
|
||||
// in runTest() does not work because we are third-party
|
||||
if (isXOrigin) {
|
||||
gExpectedCookies -= 1;
|
||||
}
|
||||
|
||||
// Listen for MessageEvents.
|
||||
window.addEventListener("message", messageReceiver);
|
||||
|
||||
|
@ -23,6 +23,11 @@ user_pref("general.smoothScroll", true);
|
||||
// storage access API spec for secure contexts.
|
||||
user_pref("dom.storage_access.dont_grant_insecure_contexts", false);
|
||||
|
||||
// Many mochitests rely upon this behavior (which is being deprecated)
|
||||
// while testing other behaviors. We plan to update all tests to not
|
||||
// rely upon it, remove this pref, then roll out to release.
|
||||
user_pref("privacy.restrict3rdpartystorage.heuristic.window_open", true);
|
||||
|
||||
// Turn off update
|
||||
user_pref("app.update.disabledForTesting", true);
|
||||
|
||||
|
@ -107,7 +107,6 @@ AntiTracking.runTest(
|
||||
"privacy.partition.always_partition_third_party_non_cookie_storage",
|
||||
false,
|
||||
],
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
], // extra prefs
|
||||
true, // run the window.open() test
|
||||
true, // run the user interaction test
|
||||
|
@ -103,10 +103,7 @@ AntiTracking.runTest(
|
||||
);
|
||||
});
|
||||
},
|
||||
[
|
||||
["privacy.partition.always_partition_third_party_non_cookie_storage", true],
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
], // extra prefs
|
||||
[["privacy.partition.always_partition_third_party_non_cookie_storage", true]], // extra prefs
|
||||
true, // run the window.open() test
|
||||
true, // run the user interaction test
|
||||
[
|
||||
|
@ -45,7 +45,6 @@ AntiTracking.runTest(
|
||||
"privacy.partition.always_partition_third_party_non_cookie_storage",
|
||||
false,
|
||||
],
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
], // extra prefs
|
||||
true, // run the window.open() test
|
||||
true, // run the user interaction test
|
||||
|
@ -40,10 +40,7 @@ AntiTracking.runTest(
|
||||
);
|
||||
});
|
||||
},
|
||||
[
|
||||
["privacy.partition.always_partition_third_party_non_cookie_storage", true],
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
], // extra prefs
|
||||
[["privacy.partition.always_partition_third_party_non_cookie_storage", true]], // extra prefs
|
||||
true, // run the window.open() test
|
||||
true, // run the user interaction test
|
||||
[
|
||||
|
@ -19,7 +19,6 @@ add_task(async function () {
|
||||
"privacy.restrict3rdpartystorage.userInteractionRequiredForHosts",
|
||||
"tracking.example.com,tracking.example.org",
|
||||
],
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -48,6 +48,7 @@ AntiTracking._createTask({
|
||||
errorMessageDomains: [
|
||||
"https://tracking.example.org",
|
||||
"https://tracking.example.org",
|
||||
"https://tracking.example.org",
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -52,6 +52,7 @@ AntiTracking._createTask({
|
||||
"https://tracking.example.org",
|
||||
"https://tracking.example.org",
|
||||
"https://tracking.example.org",
|
||||
"https://tracking.example.org",
|
||||
"https://another-tracking.example.net",
|
||||
"https://itisatracker.org",
|
||||
],
|
||||
|
@ -22,9 +22,6 @@ add_task(async function () {
|
||||
],
|
||||
// Bug 1617611: Fix all the tests broken by "cookies SameSite=lax by default"
|
||||
["network.cookie.sameSite.laxByDefault", false],
|
||||
// This test validates old TCP behavior and relies upon the opener heuristic to
|
||||
// give access to cookies to known trackers.
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -281,9 +281,6 @@ add_task(async function () {
|
||||
"privacy.partition.always_partition_third_party_non_cookie_storage",
|
||||
false,
|
||||
],
|
||||
// This test validates old TCP behavior and relies upon the opener heuristic to
|
||||
// give access to cookies to known trackers.
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -286,9 +286,6 @@ add_task(async function () {
|
||||
"privacy.partition.always_partition_third_party_non_cookie_storage",
|
||||
true,
|
||||
],
|
||||
// This test validates old TCP behavior and relies upon the opener heuristic to
|
||||
// give access to cookies to known trackers.
|
||||
["privacy.restrict3rdpartystorage.heuristic.window_open", true],
|
||||
],
|
||||
});
|
||||
|
||||
|
@ -224,10 +224,6 @@ add_task(async function test_webext_contentscript_iframe_subframe_privileges() {
|
||||
});
|
||||
|
||||
add_task(async function test_webext_background_remote_subframe_privileges() {
|
||||
// we have to enable unpartitioned cookie access for xorigin tests to set the cookie
|
||||
// where the popup can read it.
|
||||
await SimpleTest.enableLegacyUnpartitionedStorage();
|
||||
|
||||
// file_remote_frame.html is opened at the same origin as this test page.
|
||||
document.cookie = "cookie=monster";
|
||||
|
||||
|
@ -25,7 +25,9 @@ const WIN_URL =
|
||||
|
||||
add_task(async function test_webRequest_redirect_cors_bypass() {
|
||||
// disable third-party storage isolation so the test works as expected
|
||||
await SimpleTest.enableLegacyUnpartitionedStorage();
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["privacy.partition.always_partition_third_party_non_cookie_storage", false]],
|
||||
});
|
||||
|
||||
let extension = ExtensionTestUtils.loadExtension({
|
||||
manifest: {
|
||||
|
@ -28,8 +28,6 @@ async function test_crossOriginBfcacheRestore() {
|
||||
// If Fission is disabled, the pref is no-op.
|
||||
await SpecialPowers.pushPrefEnv({set: [["fission.bfcacheInParent", true]]});
|
||||
|
||||
await SimpleTest.enableLegacyUnpartitionedStorage();
|
||||
|
||||
var bc = new BroadcastChannel("form_basic_bfcache");
|
||||
window.open("form_basic_bfcache.html", "", "noopener");
|
||||
var pageshowCount = 0;
|
||||
|
@ -24,8 +24,6 @@ same domain as the opener.
|
||||
}
|
||||
|
||||
add_task(async function() {
|
||||
await SimpleTest.enableLegacyUnpartitionedStorage();
|
||||
|
||||
const TEST_VALUE = "test-value";
|
||||
// This magic value of 2 means that by default, when content tries
|
||||
// to open a new window, it'll actually open in a new window instead
|
||||
|
Loading…
Reference in New Issue
Block a user