forked from mirrors/gecko-dev
Backed out changeset 25f376fb859f (bug 1873973) for causing various regressions.
CLOSED TREE
This commit is contained in:
parent
6ea5420af4
commit
b5c7b70b7e
6 changed files with 31 additions and 23 deletions
|
|
@ -23,6 +23,6 @@ function run_test() {
|
||||||
|
|
||||||
Assert.equal(
|
Assert.equal(
|
||||||
createPrincipal("http://test/foo^bar").exposableSpec,
|
createPrincipal("http://test/foo^bar").exposableSpec,
|
||||||
"http://test/foo^bar"
|
"http://test/foo%5Ebar"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -499,25 +499,6 @@ add_test(function test_hugeStringThrows() {
|
||||||
run_next_test();
|
run_next_test();
|
||||||
});
|
});
|
||||||
|
|
||||||
add_test(function test_caretNotEscaped() {
|
|
||||||
var url = stringToURL("wss://host/ !\"$%&'()*+,-./:;<=>@[\\]^_{|}~");
|
|
||||||
Assert.equal(
|
|
||||||
url.spec,
|
|
||||||
"wss://host/%20!%22$%&'()*+,-./:;%3C=%3E@[/]^_%7B|%7D~"
|
|
||||||
);
|
|
||||||
|
|
||||||
url = stringToURL("wss://host/abc^.bar");
|
|
||||||
Assert.equal(url.spec, "wss://host/abc^.bar");
|
|
||||||
|
|
||||||
url = stringToURL("wss://host/path/to/something?q=foo^bar");
|
|
||||||
Assert.equal(url.spec, "wss://host/path/to/something?q=foo^bar");
|
|
||||||
|
|
||||||
url = stringToURL("wss://host/#^");
|
|
||||||
Assert.equal(url.spec, "wss://host/#^");
|
|
||||||
|
|
||||||
run_next_test();
|
|
||||||
});
|
|
||||||
|
|
||||||
add_test(function test_filterWhitespace() {
|
add_test(function test_filterWhitespace() {
|
||||||
let url = stringToURL(
|
let url = stringToURL(
|
||||||
" \r\n\th\nt\rt\tp://ex\r\n\tample.com/path\r\n\t/\r\n\tto the/fil\r\n\te.e\r\n\txt?que\r\n\try#ha\r\n\tsh \r\n\t "
|
" \r\n\th\nt\rt\tp://ex\r\n\tample.com/path\r\n\t/\r\n\tto the/fil\r\n\te.e\r\n\txt?que\r\n\try#ha\r\n\tsh \r\n\t "
|
||||||
|
|
|
||||||
|
|
@ -596,6 +596,9 @@
|
||||||
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -974,4 +977,8 @@
|
||||||
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> against <about:blank>]
|
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[a-element-xhtml.xhtml?include=mailto]
|
[a-element-xhtml.xhtml?include=mailto]
|
||||||
|
|
|
||||||
|
|
@ -625,6 +625,9 @@
|
||||||
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -1003,4 +1006,8 @@
|
||||||
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> against <about:blank>]
|
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[a-element.html?include=mailto]
|
[a-element.html?include=mailto]
|
||||||
|
|
|
||||||
|
|
@ -403,6 +403,9 @@
|
||||||
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -992,6 +995,9 @@
|
||||||
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> against <about:blank>]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
[Parsing: <foo://host/dir/? !"$%&'()*+,-./:;<=>?@[\\\]^_`{|}~> against <about:blank>]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
|
@ -1200,6 +1206,9 @@
|
||||||
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> without base]
|
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> without base]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> without base]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[url-constructor.any.html?include=file]
|
[url-constructor.any.html?include=file]
|
||||||
[Parsing: <file:c:\\foo\\bar.html> against <file:///tmp/mock/path>]
|
[Parsing: <file:c:\\foo\\bar.html> against <file:///tmp/mock/path>]
|
||||||
|
|
@ -1527,6 +1536,10 @@
|
||||||
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> without base]
|
[Parsing: <wss://!"$&'()*+,-.;=_`{}~/> without base]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
||||||
|
[Parsing: <wss://host/ !"$%&'()*+,-./:;<=>@[\\\]^_`{|}~> without base]
|
||||||
|
expected: FAIL
|
||||||
|
|
||||||
|
|
||||||
[url-constructor.any.html?include=javascript]
|
[url-constructor.any.html?include=javascript]
|
||||||
[Parsing: <javascript:/../> without base]
|
[Parsing: <javascript:/../> without base]
|
||||||
expected: FAIL
|
expected: FAIL
|
||||||
|
|
|
||||||
|
|
@ -278,9 +278,9 @@ static constexpr std::array<uint32_t, 256> BuildEscapeChars() {
|
||||||
AddUnescapedChars("'.", esc_Username, table);
|
AddUnescapedChars("'.", esc_Username, table);
|
||||||
AddUnescapedChars("'.", esc_Password, table);
|
AddUnescapedChars("'.", esc_Password, table);
|
||||||
AddUnescapedChars(".", esc_Host, table); // Same as esc_Scheme
|
AddUnescapedChars(".", esc_Host, table); // Same as esc_Scheme
|
||||||
AddUnescapedChars("'./:;=@[]^|", esc_Directory, table);
|
AddUnescapedChars("'./:;=@[]|", esc_Directory, table);
|
||||||
AddUnescapedChars("'.:;=@[]^|", esc_FileBaseName, table);
|
AddUnescapedChars("'.:;=@[]|", esc_FileBaseName, table);
|
||||||
AddUnescapedChars("':;=@[]^|", esc_FileExtension, table);
|
AddUnescapedChars("':;=@[]|", esc_FileExtension, table);
|
||||||
AddUnescapedChars(".:;=@[\\]^`{|}", esc_Param, table);
|
AddUnescapedChars(".:;=@[\\]^`{|}", esc_Param, table);
|
||||||
AddUnescapedChars("./:;=?@[\\]^`{|}", esc_Query, table);
|
AddUnescapedChars("./:;=?@[\\]^`{|}", esc_Query, table);
|
||||||
AddUnescapedChars("#'./:;=?@[\\]^{|}", esc_Ref, table);
|
AddUnescapedChars("#'./:;=?@[\\]^{|}", esc_Ref, table);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue