Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /workers/Worker-constructor-proto.any.serviceworker.html - WPT Dashboard Interop Dashboard
- /workers/Worker-constructor-proto.any.sharedworker.html - WPT Dashboard Interop Dashboard
- /workers/Worker-constructor-proto.any.worker.html - WPT Dashboard Interop Dashboard
//META: global=worker
test(() => {
const proto = {};
assert_equals(String(Object.getPrototypeOf(WorkerLocation)).replace(/\n/g, " ").replace(/\s\s+/g, " "), "function () { [native code] }");
Object.setPrototypeOf(WorkerLocation, proto);
assert_equals(Object.getPrototypeOf(WorkerLocation), proto);
}, 'Tests that setting the proto of a built in constructor is not reset.');