-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1810968 [wpt PR 38032] - URL and HTML: correct protocol setter te…
…sts, a=testonly Automatic update from web-platform-tests URL and HTML: correct protocol setter tests For whatwg/url#609. -- wpt-commits: 865a920dd12159c324560f482288094088cba1ce wpt-pr: 38032
- Loading branch information
1 parent
3438dd1
commit cadebbb
Showing
4 changed files
with
86 additions
and
19 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
26 changes: 26 additions & 0 deletions
26
.../tests/html/browsers/history/the-location-interface/location-protocol-setter-sameish.html
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,26 @@ | ||
<!doctype html> | ||
<title>Set location.protocol to the scheme it already was</title> | ||
<script src=/resources/testharness.js></script> | ||
<script src=/resources/testharnessreport.js></script> | ||
<div id=log></div> | ||
<iframe src=/common/blank.html></iframe> | ||
<iframe src=/common/blank.html></iframe> | ||
<iframe src=/common/blank.html></iframe> | ||
<iframe src=/common/blank.html></iframe> | ||
<script> | ||
self.onload = () => { | ||
[ | ||
"http", | ||
"ht\x0Atp", | ||
"http\x0A", | ||
"\x09ht\x09\x0AtP" | ||
].forEach((val, index) => { | ||
async_test(t => { | ||
self[index].frameElement.onload = t.step_func_done(() => { | ||
assert_equals(self[index].location.protocol, "http:"); | ||
}); | ||
self[index].location.protocol = val; | ||
}, `Set location.protocol to ${encodeURI(val)} (percent-encoded here for clarity)`); | ||
}); | ||
} | ||
</script> |
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