Bug 1889988 - Re-enable defaultURI as parser for unknown schemes and update tests. r=valentin,bvandersloot

Differential Revision: https://phabricator.services.mozilla.com/D226408
This commit is contained in:
edgul 2024-10-23 18:30:27 +00:00
parent acc1cee52b
commit 7b73033c75
6 changed files with 4 additions and 8 deletions

View File

@ -13762,7 +13762,7 @@
# Whether to use the rust implemented DefaultURI for unknown scheme types
- name: network.url.useDefaultURI
type: RelaxedAtomicBool
value: false
value: true
mirror: always
# Allows use of a protocol exception list that will bypass defaultURI parser

View File

@ -14,8 +14,6 @@
// http://greenbytes.de/tech/webdav/rfc3986.html#rfc.section.5.4
// http://greenbytes.de/tech/tc/uris/
Services.prefs.setBoolPref("network.url.useDefaultURI", true);
// TEST DATA
// ---------
var gTests = [

View File

@ -1,3 +1,2 @@
lsan-allowed: [Alloc, NS_NewRunnableFunction, Realloc, _M_init_functor, mozilla::net::HttpChannelChild::ContinueAsyncOpen, nsHtml5Parser::MarkAsNotScriptCreated]
prefs: [network.url.useDefaultURI:true]
leak-threshold: [tab:51200]

View File

@ -1 +1 @@
prefs: [dom.targetBlankNoOpener.enabled:true, network.url.useDefaultURI:true]
prefs: [dom.targetBlankNoOpener.enabled:true]

View File

@ -1,3 +1,2 @@
leak-threshold: [default:51200, tab:51200]
prefs: [network.dns.native-is-localhost:true,
network.url.useDefaultURI:true]
prefs: [network.dns.native-is-localhost:true]

View File

@ -33,7 +33,7 @@ const TESTCASES = [
],
["file:///foo/bar", "file://"],
["file://foo/bar", "file://"],
["randomprotocol://example.com", null],
["randomprotocol://example.com", "randomprotocol://example.com"],
];
for (let [input, expected, allowJS] of TESTCASES) {