Skip to content

Commit 5d2b1b4

Browse files
committed
Bug 1998956 [wpt PR 55938] - [Origin API] Verify that comparisons are schemeful., a=testonly
Automatic update from web-platform-tests [Origin API] Verify that comparisons are schemeful. whatwg/html#11846 (comment) noted that we should verify schemeful same-site comparison; this CL adds that test. Bug: 434131026 Change-Id: I48878979fc0f8c3dab2caefbe788a14d367e053b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7130621 Reviewed-by: Antonio Sartori <antoniosartorichromium.org> Commit-Queue: Mike West <mkwstchromium.org> Cr-Commit-Position: refs/heads/main{#1541759} -- wpt-commits: 08b913918dd419fe48d01ef685781a69ced0a111 wpt-pr: 55938 UltraBlame original commit: 313ef5bf80f71a4e57fc5bebfd0d784dd667b024
1 parent 9bbdb07 commit 5d2b1b4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

testing/web-platform/tests/html/browsers/origin/tentative/api/origin-comparison.any.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,14 @@ test(t => {
3535
assert_false(a_a.isSameSite(b), "Origins with different registrable domains should not be same-site.");
3636
assert_false(a_a.isSameSite(b_b), "Origins with different registrable domains should not be same-site.");
3737
}, "Comparison of tuple origins.");
38+
39+
test(t => {
40+
const http = new Origin("http://a.example");
41+
const https = new Origin("https://a.example");
42+
43+
assert_false(http.isSameOrigin(https), "http is not same-site with https");
44+
assert_false(https.isSameOrigin(http), "https is not same-site with http");
45+
46+
assert_false(http.isSameSite(https), "http is not same-site with https");
47+
assert_false(https.isSameSite(http), "https is not same-site with http");
48+
}, "Comparisons are schemeful.");

0 commit comments

Comments
 (0)