mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 05:39:41 +02:00
Automatic update from web-platform-tests Fixing test to use wpt server features. Change-Id: I6c40eacb5635461375543d857b37bb2bd36a2805 Reviewed-on: https://chromium-review.googlesource.com/c/1446773 Reviewed-by: Philip Jägenstedt <foolip@chromium.org> Commit-Queue: Philip Jägenstedt <foolip@chromium.org> Cr-Commit-Position: refs/heads/master@{#627717} -- wpt-commits: c0d2352f34b33d8cd346b38db301cfa2c5be92f2 wpt-pr: 15164
14 lines
789 B
JavaScript
14 lines
789 B
JavaScript
// META: global=!default, dedicatedworker, sharedworker
|
|
test(() => {
|
|
assert_equals(String(WorkerLocation), "function WorkerLocation() { [native code] }");
|
|
assert_true(location instanceof Object);
|
|
assert_equals(location.href, 'http://{{host}}:{{ports[http][0]}}/workers/Worker-location.sub.any.worker.js');
|
|
assert_equals(location.origin, "http://{{host}}:{{ports[http][0]}}");
|
|
assert_equals(location.protocol, "http:");
|
|
assert_equals(location.host, "{{host}}:{{ports[http][0]}}");
|
|
assert_equals(location.hostname, "{{host}}");
|
|
assert_equals(location.port, "{{ports[http][0]}}");
|
|
assert_equals(location.pathname, "/workers/Worker-location.sub.any.worker.js");
|
|
assert_equals(location.search, "");
|
|
assert_equals(location.hash, "");
|
|
}, 'Test WorkerLocation properties.');
|