Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /html/browsers/origin/tentative/api/origin-from-global.any.html - WPT Dashboard Interop Dashboard
- /html/browsers/origin/tentative/api/origin-from-global.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /html/browsers/origin/tentative/api/origin-from-global.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /html/browsers/origin/tentative/api/origin-from-global.any.worker.html - WPT Dashboard Interop Dashboard
// META: title=`Origin.from(WindowOrWorkerGlobalScope)`
// META: global=window,worker
// META: script=/common/get-host-info.sub.js
test(t => {
const origin = Origin.from(globalThis);
assert_true(!!origin);
assert_false(origin.opaque, "Origin should not be opaque.");
assert_true(origin.isSameOrigin(Origin.from(get_host_info().ORIGIN)));
}, `Origin.from(globalThis) is a tuple origin.`);