Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions html/browsers/origin/tentative/api/origin-comparison.any.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// META: title=`Origin` comparison

test(t => {
const opaqueA = new Origin("null");
const opaqueB = new Origin("null");
const opaqueA = new Origin();
const opaqueB = new Origin();
assert_true(opaqueA.opaque);
assert_true(opaqueB.opaque);

assert_true(opaqueA.isSameOrigin(opaqueA), "Opaque origin should be same-origin with itself.");
assert_true(opaqueA.isSameSite(opaqueA), "Opaque origin should be same-site with itself.");
Expand All @@ -11,11 +13,11 @@ test(t => {
}, "Comparison of opaque origins.");

test(t => {
const a = new Origin("https://a.example");
const a_a = new Origin("https://a.a.example");
const b_a = new Origin("https://b.a.example");
const b = new Origin("https://b.example");
const b_b = new Origin("https://b.b.example");
const a = Origin.from("https://a.example");
const a_a = Origin.from("https://a.a.example");
const b_a = Origin.from("https://b.a.example");
const b = Origin.from("https://b.example");
const b_b = Origin.from("https://b.b.example");

assert_true(a.isSameOrigin(a), "Origin should be same-origin with itself.");
assert_false(a.isSameOrigin(a_a), "Origins with different subdomains should not be same-origin.");
Expand All @@ -37,8 +39,8 @@ test(t => {
}, "Comparison of tuple origins.");

test(t => {
const http = new Origin("http://a.example");
const https = new Origin("https://a.example");
const http = Origin.from("http://a.example");
const https = Origin.from("https://a.example");

assert_false(http.isSameOrigin(https), "http is not same-site with https");
assert_false(https.isSameOrigin(http), "https is not same-site with http");
Expand Down
71 changes: 0 additions & 71 deletions html/browsers/origin/tentative/api/origin-fromURL.any.js

This file was deleted.

80 changes: 0 additions & 80 deletions html/browsers/origin/tentative/api/origin.any.js

This file was deleted.

4 changes: 1 addition & 3 deletions interfaces/origin.tentative.idl
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
[Exposed=*]
interface Origin {
constructor();
constructor(USVString serializedOrigin);

static Origin? parse(USVString serializedOrigin);
static Origin? fromURL(USVString serializedURL);
static Origin from(any value);

readonly attribute boolean opaque;

Expand Down