-
Notifications
You must be signed in to change notification settings - Fork 29.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
url: exit early when : delimiter is seen in hostname
This aligns with an upstream spec change. PR-URL: #38742 Fixes: #38710 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: James M Snell <[email protected]>
- Loading branch information
1 parent
e9be209
commit 7773d58
Showing
10 changed files
with
101 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Keep this file in sync with url-setters-a-area.window.js. | ||
|
||
promise_test(() => fetch("resources/setters_tests.json").then(res => res.json()).then(runURLSettersTests), "Loading data…"); | ||
|
||
function runURLSettersTests(all_test_cases) { | ||
for (var attribute_to_be_set in all_test_cases) { | ||
if (attribute_to_be_set == "comment") { | ||
continue; | ||
} | ||
var test_cases = all_test_cases[attribute_to_be_set]; | ||
for(var i = 0, l = test_cases.length; i < l; i++) { | ||
var test_case = test_cases[i]; | ||
var name = "Setting <" + test_case.href + ">." + attribute_to_be_set + | ||
" = '" + test_case.new_value + "'"; | ||
if ("comment" in test_case) { | ||
name += " " + test_case.comment; | ||
} | ||
test(function() { | ||
var url = new URL(test_case.href); | ||
url[attribute_to_be_set] = test_case.new_value; | ||
for (var attribute in test_case.expected) { | ||
assert_equals(url[attribute], test_case.expected[attribute]) | ||
} | ||
}, "URL: " + name) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters