mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1813489: Remove pref dom.security.secFetch.enabled, r=dveditz
Differential Revision: https://phabricator.services.mozilla.com/D168229
This commit is contained in:
parent
c9c81d4680
commit
0866d5a7c5
@ -379,11 +379,6 @@ void mozilla::dom::SecFetch::AddSecFetchUser(nsIHttpChannel* aHTTPChannel) {
|
||||
}
|
||||
|
||||
void mozilla::dom::SecFetch::AddSecFetchHeader(nsIHttpChannel* aHTTPChannel) {
|
||||
// if sec-fetch-* is prefed off, then there is nothing to do
|
||||
if (!StaticPrefs::dom_security_secFetch_enabled()) {
|
||||
return;
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIURI> uri;
|
||||
nsresult rv = aHTTPChannel->GetURI(getter_AddRefs(uri));
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
|
@ -8,10 +8,6 @@ let gExpectedHeader = {};
|
||||
|
||||
async function setup() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.security.secFetch.enabled", true]],
|
||||
});
|
||||
}
|
||||
|
||||
function checkSecFetchUser(subject, topic, data) {
|
||||
@ -166,10 +162,6 @@ async function testNavigations() {
|
||||
add_task(async function() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.security.secFetch.enabled", true]],
|
||||
});
|
||||
|
||||
await testNavigations();
|
||||
|
||||
// If fission is enabled we also want to test the navigations with the bfcache
|
||||
|
@ -76,12 +76,9 @@ function iframeAction(test) {
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.security.secFetch.enabled", true]]}, async () => {
|
||||
testFrame = document.createElement('iframe');
|
||||
testFrame.src = `https://example.org/${REQUEST_PATH}?test`;
|
||||
document.body.appendChild(testFrame);
|
||||
});
|
||||
|
||||
testFrame = document.createElement('iframe');
|
||||
testFrame.src = `https://example.org/${REQUEST_PATH}?test`;
|
||||
document.body.appendChild(testFrame);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -86,11 +86,9 @@ script.addMessageListener("test-pass", async () => {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.security.secFetch.enabled", true]]}, async () => {
|
||||
let frame = document.createElement("iframe");
|
||||
frame.src = REQUEST_URL + "?meta";
|
||||
document.body.appendChild(frame);
|
||||
});
|
||||
let frame = document.createElement("iframe");
|
||||
frame.src = REQUEST_URL + "?meta";
|
||||
document.body.appendChild(frame);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -86,11 +86,9 @@ script.addMessageListener("test-pass", async () => {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.security.secFetch.enabled", true]]}, async () => {
|
||||
let frame = document.createElement("iframe");
|
||||
frame.srcdoc = `<meta http-equiv="refresh" content="0; url='${REQUEST_URL}?meta'">`;
|
||||
document.body.appendChild(frame);
|
||||
});
|
||||
let frame = document.createElement("iframe");
|
||||
frame.srcdoc = `<meta http-equiv="refresh" content="0; url='${REQUEST_URL}?meta'">`;
|
||||
document.body.appendChild(frame);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -91,9 +91,7 @@ script.addMessageListener("test-pass", async () => {
|
||||
SimpleTest.finish();
|
||||
});
|
||||
|
||||
SpecialPowers.pushPrefEnv({set: [["dom.security.secFetch.enabled", true]]}, async () => {
|
||||
testWindow = window.open(REQUEST_URL + "?meta");
|
||||
});
|
||||
testWindow = window.open(REQUEST_URL + "?meta");
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -60,20 +60,14 @@ script.addMessageListener("test-end", () => {
|
||||
checkTestsDone();
|
||||
});
|
||||
|
||||
function test_sec_fetch_websocket() {
|
||||
var wssSocket = new WebSocket("wss://example.com/tests/dom/security/test/sec-fetch/file_websocket");
|
||||
wssSocket.onopen = function(e) {
|
||||
ok(true, "sanity: wssSocket onopen");
|
||||
checkTestsDone();
|
||||
};
|
||||
wssSocket.onerror = function(e) {
|
||||
ok(false, "sanity: wssSocket onerror");
|
||||
};
|
||||
}
|
||||
|
||||
SpecialPowers.pushPrefEnv({
|
||||
set: [["dom.security.secFetch.enabled", true]]
|
||||
}, test_sec_fetch_websocket);
|
||||
var wssSocket = new WebSocket("wss://example.com/tests/dom/security/test/sec-fetch/file_websocket");
|
||||
wssSocket.onopen = function(e) {
|
||||
ok(true, "sanity: wssSocket onopen");
|
||||
checkTestsDone();
|
||||
};
|
||||
wssSocket.onerror = function(e) {
|
||||
ok(false, "sanity: wssSocket onerror");
|
||||
};
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -3599,13 +3599,6 @@
|
||||
value: false
|
||||
mirror: always
|
||||
|
||||
# This pref enables Sec-Fetch-* logic and causes corresponding
|
||||
# request headers to be set.
|
||||
- name: dom.security.secFetch.enabled
|
||||
type: RelaxedAtomicBool
|
||||
value: true
|
||||
mirror: always
|
||||
|
||||
# This pref enables the featurePolicy header support.
|
||||
- name: dom.security.featurePolicy.header.enabled
|
||||
type: bool
|
||||
|
@ -1,3 +1,2 @@
|
||||
prefs: [dom.security.secFetch.enabled:true]
|
||||
lsan-allowed: [Alloc, Create, MakeUnique, Malloc, PLDHashTable::ChangeTable, PLDHashTable::MakeEntryHandle, Realloc, allocate, createTable, mozilla::BasePrincipal::CreateContentPrincipal, mozilla::Permission::Create, mozilla::ThrottledEventQueue::Create, mozilla::WeakPtr, mozilla::dom::BrowsingContext::Attach, mozilla::dom::BrowsingContext::CreateChildSHistory, mozilla::dom::BrowsingContext::CreateDetached, mozilla::dom::CanonicalBrowsingContext::GetSecureBrowserUI, mozilla::dom::ContentParent::CreateBrowser, mozilla::dom::Performance::CreateForMainThread, mozilla::dom::PerformanceMainThread::CreateNavigationTimingEntry, mozilla::dom::ReferrerInfo::Clone, mozilla::dom::ServiceWorker::Create, mozilla::extensions::ChannelWrapper::ChannelWrapper, mozilla::net::HttpBaseChannel::CloneLoadInfoForRedirect, mozilla::net::HttpBaseChannel::HttpBaseChannel, mozilla::net::nsStandardURL::TemplatedMutator, nsDynamicAtom::Create, nsHashPropertyBagBase::SetPropertyAsInterface, operator]
|
||||
leak-threshold: [default:51200, tab:358400]
|
||||
|
@ -1,3 +1,2 @@
|
||||
prefs: [dom.security.secFetch.enabled:true]
|
||||
lsan-disabled: true
|
||||
leak-threshold: [tab:51200]
|
||||
|
Loading…
Reference in New Issue
Block a user