Re-sync workers web platform tests from upstream
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2019 16:42:27 +0000 (16:42 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Sep 2019 16:42:27 +0000 (16:42 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201629

Reviewed by Alex Christensen.

LayoutTests/imported/w3c:

Re-sync workers web platform tests from upstream 603a271948a7162.

* web-platform-tests/workers/META.yml: Added.
* web-platform-tests/workers/OWNERS: Removed.
* web-platform-tests/workers/README.md:
* web-platform-tests/workers/SharedWorker-constructor-expected.txt: Added.
* web-platform-tests/workers/SharedWorker-constructor.html: Added.
* web-platform-tests/workers/SharedWorker-detach-frame-in-error-event-expected.txt: Added.
* web-platform-tests/workers/SharedWorker-detach-frame-in-error-event.html: Added.
* web-platform-tests/workers/SharedWorker-exception-expected.txt: Added.
* web-platform-tests/workers/SharedWorker-exception-propagation-expected.txt: Added.
* web-platform-tests/workers/SharedWorker-exception-propagation.html: Added.
* web-platform-tests/workers/SharedWorker-exception.html: Added.
* web-platform-tests/workers/SharedWorker-script-error-expected.txt: Added.
* web-platform-tests/workers/SharedWorker-script-error.html: Added.
* web-platform-tests/workers/SharedWorker-simple-expected.txt: Added.
* web-platform-tests/workers/SharedWorker-simple.html: Added.
* web-platform-tests/workers/SharedWorkerPerformanceNow-expected.txt: Added.
* web-platform-tests/workers/SharedWorkerPerformanceNow.html: Added.
* web-platform-tests/workers/SharedWorker_dataUrl-expected.txt: Added.
* web-platform-tests/workers/SharedWorker_dataUrl.html: Added.
* web-platform-tests/workers/Worker-call.worker-expected.txt: Added.
* web-platform-tests/workers/Worker-call.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/Worker-call.worker.js: Added.
(test):
* web-platform-tests/workers/Worker-messageport-expected.txt: Added.
* web-platform-tests/workers/Worker-messageport.html: Added.
* web-platform-tests/workers/Worker-multi-port-expected.txt: Added.
* web-platform-tests/workers/Worker-multi-port.html: Added.
* web-platform-tests/workers/Worker-nested-importScripts-error-expected.txt: Added.
* web-platform-tests/workers/Worker-nested-importScripts-error.html: Added.
* web-platform-tests/workers/Worker-simultaneous-errors-expected.txt: Added.
* web-platform-tests/workers/Worker-simultaneous-errors.html: Added.
* web-platform-tests/workers/Worker-structure-message-expected.txt: Added.
* web-platform-tests/workers/Worker-structure-message.html: Added.
* web-platform-tests/workers/Worker-terminate-forever-expected.txt: Added.
* web-platform-tests/workers/Worker-terminate-forever.html: Added.
* web-platform-tests/workers/Worker-termination-with-port-messages-expected.txt: Added.
* web-platform-tests/workers/Worker-termination-with-port-messages.html: Added.
* web-platform-tests/workers/Worker-timeout-cancel-order-expected.txt: Added.
* web-platform-tests/workers/Worker-timeout-cancel-order.html: Added.
* web-platform-tests/workers/Worker-timeout-decreasing-order-expected.txt: Added.
* web-platform-tests/workers/Worker-timeout-decreasing-order.html: Added.
* web-platform-tests/workers/Worker-timeout-increasing-order-expected.txt: Added.
* web-platform-tests/workers/Worker-timeout-increasing-order.html: Added.
* web-platform-tests/workers/WorkerGlobalScope-close-expected.txt: Added.
* web-platform-tests/workers/WorkerGlobalScope-close.html: Added.
* web-platform-tests/workers/WorkerGlobalScope_close-expected.txt: Removed.
* web-platform-tests/workers/WorkerGlobalScope_close.htm: Removed.
* web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt: Added.
* web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js: Added.
* web-platform-tests/workers/WorkerLocation-origin.sub.window.js: Removed.
* web-platform-tests/workers/WorkerPerformanceNow-expected.txt: Added.
* web-platform-tests/workers/WorkerPerformanceNow.html: Added.
* web-platform-tests/workers/Worker_cross_origin_security_err.htm:
* web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/import-in-moduleworker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts.html.
* web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker.html: Added.
* web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/importScripts-in-worker.html: Added.
* web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker.html.
* web-platform-tests/workers/baseurl/alpha/w3c-import.log:
* web-platform-tests/workers/baseurl/alpha/worker-in-worker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/worker-in-worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker.html.
* web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr.html.
* web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker.html: Added.
* web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt: Added.
* web-platform-tests/workers/baseurl/alpha/xhr-in-worker.html: Added.
* web-platform-tests/workers/baseurl/beta/import.py: Added.
(main):
* web-platform-tests/workers/baseurl/beta/script.js:
* web-platform-tests/workers/baseurl/beta/w3c-import.log:
* web-platform-tests/workers/baseurl/beta/xhr-worker.py: Added.
(main):
* web-platform-tests/workers/baseurl/gamma/import.js: Added.
* web-platform-tests/workers/baseurl/gamma/importScripts.js:
(test):
* web-platform-tests/workers/baseurl/gamma/script-module.js: Added.
* web-platform-tests/workers/baseurl/gamma/script.js:
* web-platform-tests/workers/baseurl/gamma/w3c-import.log:
* web-platform-tests/workers/baseurl/gamma/xhr-worker.js: Added.
* web-platform-tests/workers/constructors/SharedWorker/connect-event.html:
* web-platform-tests/workers/constructors/SharedWorker/connect-event.js: Added.
(onconnect):
* web-platform-tests/workers/constructors/SharedWorker/dummy-name.html:
* web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.html:
* web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.js: Added.
* web-platform-tests/workers/constructors/SharedWorker/empty-name.html:
* web-platform-tests/workers/constructors/SharedWorker/empty.js: Added.
* web-platform-tests/workers/constructors/SharedWorker/global-members.html:
* web-platform-tests/workers/constructors/SharedWorker/global-members.js: Added.
(onconnect):
* web-platform-tests/workers/constructors/SharedWorker/interface-objects.html:
* web-platform-tests/workers/constructors/SharedWorker/interface-objects.js: Added.
(handleCall):
(onconnect):
* web-platform-tests/workers/constructors/SharedWorker/name.html:
* web-platform-tests/workers/constructors/SharedWorker/name.js: Added.
(onconnect):
* web-platform-tests/workers/constructors/SharedWorker/port-onmessage.html:
* web-platform-tests/workers/constructors/SharedWorker/port-onmessage.js: Added.
(onconnect):
* web-platform-tests/workers/constructors/SharedWorker/port-properties.html:
* web-platform-tests/workers/constructors/SharedWorker/port-readonly.html:
* web-platform-tests/workers/constructors/SharedWorker/same-origin.html:
* web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.html:
* web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.html.
(onconnect):
* web-platform-tests/workers/constructors/SharedWorker/w3c-import.log:
* web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror-expected.txt:
* web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.html:
* web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.js: Added.
* web-platform-tests/workers/constructors/Worker/Worker-constructor-expected.txt: Added.
* web-platform-tests/workers/constructors/Worker/Worker-constructor.html: Added.
* web-platform-tests/workers/constructors/Worker/no-arguments-ctor-expected.txt: Removed.
* web-platform-tests/workers/constructors/Worker/no-arguments-ctor.html: Removed.
* web-platform-tests/workers/constructors/Worker/resolve-empty-string-expected.txt: Removed.
* web-platform-tests/workers/constructors/Worker/resolve-empty-string.html: Removed.
* web-platform-tests/workers/constructors/Worker/same-origin.html:
* web-platform-tests/workers/constructors/Worker/sample_worker/w3c-import.log:
* web-platform-tests/workers/constructors/Worker/terminate.html:
* web-platform-tests/workers/constructors/Worker/terminate.js: Added.
(f):
* web-platform-tests/workers/constructors/Worker/unresolvable-url-expected.txt: Removed.
* web-platform-tests/workers/constructors/Worker/unresolvable-url.html: Removed.
* web-platform-tests/workers/constructors/Worker/w3c-import.log:
* web-platform-tests/workers/dedicated-worker-from-blob-url.window-expected.txt: Added.
* web-platform-tests/workers/dedicated-worker-from-blob-url.window.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/dedicated-worker-from-blob-url.window.js: Added.
(message_from_port):
* web-platform-tests/workers/examples/fetch_tests_from_worker-expected.txt: Added.
* web-platform-tests/workers/examples/fetch_tests_from_worker.html: Added.
* web-platform-tests/workers/examples/fetch_tests_from_worker.js: Added.
(test):
* web-platform-tests/workers/examples/general.worker-expected.txt: Added.
* web-platform-tests/workers/examples/general.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/examples/general.worker.js: Added.
(test):
* web-platform-tests/workers/examples/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/w3c-import.log.
* web-platform-tests/workers/interfaces.worker-expected.txt: Removed.
* web-platform-tests/workers/interfaces.worker.js: Removed.
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.js: Added.
(onmessage):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.js: Added.
(onmessage):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt: Added.
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html.
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.js: Added.
(onmessage):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-expected.txt:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.js: Added.
(catch):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.js: Added.
(catch):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.js: Added.
(catch):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.js: Added.
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.js: Added.
(onmessage):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.html:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.js: Added.
(i.catch):
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/w3c-import.log:
* web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/w3c-import.log:
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting.html:
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting.js: Added.
(switch):
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting.html:
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting.js: Added.
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/w3c-import.log:
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.html:
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js: Added.
(catch):
(try.self.onconnect.handleEvent):
(f):
* web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/incoming-message.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/incoming-message.js: Added.
(onmessage):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/sending-messages.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/sending-messages.js: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setInterval.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setInterval.js: Added.
(interval1.setInterval):
(interval2.setInterval):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setTimeout.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setTimeout.js: Added.
(x):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/close/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/members.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/members.js: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.html.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker-expected.txt: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker.html: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.js: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/returns-same-object.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/returns-same-object.js: Added.
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/setting-members.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/setting-members.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/location/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror-expected.txt:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js: Added.
(onerror):
(x):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/handled.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/handled.js: Added.
(onerror):
(x):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/not-handled.js: Added.
(onerror):
(x):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.js: Added.
(x):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/self.html:
* web-platform-tests/workers/interfaces/WorkerGlobalScope/self.js: Added.
(check):
* web-platform-tests/workers/interfaces/WorkerGlobalScope/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.html:
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.js: Added.
(setTimeout):
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/002.html:
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/002.js: Added.
(t.setTimeout):
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/003.html:
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/003.js: Added.
(setInterval):
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/004.html:
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/004.js: Added.
(t.setInterval):
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005-expected.txt: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.html.
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005.js: Added.
(t.setInterval):
* web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/003.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/003.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/005.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/005.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/007.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/007.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/008.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/008.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/009.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/009.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/010.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/010.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/011.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/011.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/012.html:
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/012.js: Added.
(catch):
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/1.headers: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/null.headers: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/undefined.headers: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/importScripts/w3c-import.log:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/002.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/002.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/003.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/003.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/004.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/004.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/005.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/005.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/006.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/006.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/007.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/007.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/language.html:
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/language.js: Added.
* web-platform-tests/workers/interfaces/WorkerUtils/navigator/w3c-import.log:
* web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.js: Added.
(import_blob_url_test):
* web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.worker-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-csp.html: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-data-url.any-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.js: Added.
(import_data_url_test):
* web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.worker-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-failure.html: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-meta.html: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import-referrer.html: Added.
* web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/modules/dedicated-worker-import.any.js: Added.
(import_test):
* web-platform-tests/workers/modules/dedicated-worker-import.any.worker-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-import.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/modules/dedicated-worker-options-credentials-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-options-credentials.html: Added.
* web-platform-tests/workers/modules/dedicated-worker-options-credentials.html.headers: Added.
* web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt: Added.
* web-platform-tests/workers/modules/dedicated-worker-options-type.html: Added.
* web-platform-tests/workers/modules/resources/credentials.py: Added.
(main):
* web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-given-url-worker.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-credentials-checker-worker.sub.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-referrer-checker-worker.sub.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-script-worker.sub.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-same-origin-credentials-checker-worker.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-same-origin-referrer-checker-worker.js: Added.
* web-platform-tests/workers/modules/resources/dynamic-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/empty-worker.js: Added.
* web-platform-tests/workers/modules/resources/eval-dynamic-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/export-on-dynamic-import-script.js: Added.
* web-platform-tests/workers/modules/resources/export-on-dynamic-import-script.js.headers: Added.
* web-platform-tests/workers/modules/resources/export-on-load-script.js: Added.
* web-platform-tests/workers/modules/resources/export-on-load-script.js.headers: Added.
* web-platform-tests/workers/modules/resources/export-on-static-import-script.js: Added.
* web-platform-tests/workers/modules/resources/export-on-static-import-script.js.headers: Added.
* web-platform-tests/workers/modules/resources/import-meta-url-worker.js: Added.
* web-platform-tests/workers/modules/resources/import-scripts-worker.js: Added.
(catch):
* web-platform-tests/workers/modules/resources/import-test-cases.js: Added.
* web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/nested-static-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/new-worker-window.html: Added.
* web-platform-tests/workers/modules/resources/post-message-on-load-worker.js: Added.
* web-platform-tests/workers/modules/resources/referrer-checker.py: Added.
(main):
* web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/static-import-non-existent-script-worker.js: Added.
* web-platform-tests/workers/modules/resources/static-import-remote-origin-credentials-checker-worker.sub.js: Added.
* web-platform-tests/workers/modules/resources/static-import-remote-origin-referrer-checker-worker.sub.js: Added.
* web-platform-tests/workers/modules/resources/static-import-remote-origin-script-worker.sub.js: Added.
* web-platform-tests/workers/modules/resources/static-import-same-origin-credentials-checker-worker.js: Added.
* web-platform-tests/workers/modules/resources/static-import-same-origin-referrer-checker-worker.js: Added.
* web-platform-tests/workers/modules/resources/static-import-worker.js: Added.
* web-platform-tests/workers/modules/resources/w3c-import.log: Added.
* web-platform-tests/workers/modules/w3c-import.log: Added.
* web-platform-tests/workers/name-property-expected.txt:
* web-platform-tests/workers/name-property.html:
* web-platform-tests/workers/nested_worker.worker.js:
(async_test):
* web-platform-tests/workers/nested_worker_close_from_parent_worker-expected.txt: Added.
* web-platform-tests/workers/nested_worker_close_from_parent_worker.html: Added.
* web-platform-tests/workers/nested_worker_close_self.worker-expected.txt: Added.
* web-platform-tests/workers/nested_worker_close_self.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/nested_worker_close_self.worker.js: Added.
(async_test):
* web-platform-tests/workers/nested_worker_importScripts.worker-expected.txt: Added.
* web-platform-tests/workers/nested_worker_importScripts.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/nested_worker_importScripts.worker.js: Added.
(async_test):
* web-platform-tests/workers/nested_worker_sync_xhr.worker-expected.txt: Added.
* web-platform-tests/workers/nested_worker_sync_xhr.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/nested_worker_sync_xhr.worker.js: Added.
(async_test):
* web-platform-tests/workers/nested_worker_terminate_from_document-expected.txt: Added.
* web-platform-tests/workers/nested_worker_terminate_from_document.html: Added.
* web-platform-tests/workers/non-automated/navigator-onLine.html:
* web-platform-tests/workers/non-automated/navigator-onLine.js: Added.
(string_appeared_here.in.self.onmessage):
(else.e.ports.0.onmessage):
(else.onconnect):
* web-platform-tests/workers/non-automated/w3c-import.log:
* web-platform-tests/workers/opaque-origin.html:
* web-platform-tests/workers/semantics/encodings/001.html:
* web-platform-tests/workers/semantics/encodings/001.html.headers: Removed.
* web-platform-tests/workers/semantics/encodings/001.js: Added.
* web-platform-tests/workers/semantics/encodings/001.js.headers: Added.
* web-platform-tests/workers/semantics/encodings/002.html:
* web-platform-tests/workers/semantics/encodings/002.html.headers: Removed.
* web-platform-tests/workers/semantics/encodings/002.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/encodings/002.js.headers: Added.
* web-platform-tests/workers/semantics/encodings/003.html:
* web-platform-tests/workers/semantics/encodings/003.js: Added.
* web-platform-tests/workers/semantics/encodings/004.html:
* web-platform-tests/workers/semantics/encodings/004.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/encodings/w3c-import.log:
* web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt:
* web-platform-tests/workers/semantics/interface-objects/001.worker.js:
* web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt:
* web-platform-tests/workers/semantics/interface-objects/002.worker.js:
* web-platform-tests/workers/semantics/interface-objects/003.html:
* web-platform-tests/workers/semantics/interface-objects/003.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.html.
(onconnect):
* web-platform-tests/workers/semantics/interface-objects/004.html:
* web-platform-tests/workers/semantics/interface-objects/004.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/004.html.
(onconnect):
* web-platform-tests/workers/semantics/interface-objects/w3c-import.log:
* web-platform-tests/workers/semantics/multiple-workers/001.html:
* web-platform-tests/workers/semantics/multiple-workers/001.js: Added.
(string_appeared_here.in.self.onmessage):
(else.e.ports.0.onmessage):
(else.onconnect):
* web-platform-tests/workers/semantics/multiple-workers/002.html:
* web-platform-tests/workers/semantics/multiple-workers/002.js: Added.
* web-platform-tests/workers/semantics/multiple-workers/003.html:
* web-platform-tests/workers/semantics/multiple-workers/003.js: Added.
(location.hash.string_appeared_here.w2.onmessage):
(else.w3.onmessage):
(else):
* web-platform-tests/workers/semantics/multiple-workers/004-expected.txt:
* web-platform-tests/workers/semantics/multiple-workers/004.html:
* web-platform-tests/workers/semantics/multiple-workers/005.html:
* web-platform-tests/workers/semantics/multiple-workers/006.html:
* web-platform-tests/workers/semantics/multiple-workers/007.html:
* web-platform-tests/workers/semantics/multiple-workers/008-1.html:
* web-platform-tests/workers/semantics/multiple-workers/008.html:
* web-platform-tests/workers/semantics/multiple-workers/008.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/multiple-workers/w3c-import.log:
* web-platform-tests/workers/semantics/navigation/001-1.html:
* web-platform-tests/workers/semantics/navigation/001-1.js: Added.
(setInterval):
* web-platform-tests/workers/semantics/navigation/w3c-import.log:
* web-platform-tests/workers/semantics/reporting-errors/001.html:
* web-platform-tests/workers/semantics/reporting-errors/001.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/001.html.
(onerror):
(onconnect):
* web-platform-tests/workers/semantics/reporting-errors/002.html:
* web-platform-tests/workers/semantics/reporting-errors/002.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/002.html.
(onconnect):
* web-platform-tests/workers/semantics/reporting-errors/003.html:
* web-platform-tests/workers/semantics/reporting-errors/003.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/reporting-errors/004-1.html:
* web-platform-tests/workers/semantics/reporting-errors/004.html:
* web-platform-tests/workers/semantics/reporting-errors/004.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/reporting-errors/w3c-import.log:
* web-platform-tests/workers/semantics/run-a-worker/001.html:
* web-platform-tests/workers/semantics/run-a-worker/001.js: Added.
* web-platform-tests/workers/semantics/run-a-worker/002.html:
* web-platform-tests/workers/semantics/run-a-worker/002.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/run-a-worker/003.html:
* web-platform-tests/workers/semantics/run-a-worker/w3c-import.log:
* web-platform-tests/workers/semantics/structured-clone/w3c-import.log:
* web-platform-tests/workers/semantics/xhr/001.html:
* web-platform-tests/workers/semantics/xhr/001.js: Added.
(xhr.onreadystatechange):
* web-platform-tests/workers/semantics/xhr/002.html:
* web-platform-tests/workers/semantics/xhr/002.js: Added.
* web-platform-tests/workers/semantics/xhr/003.html:
* web-platform-tests/workers/semantics/xhr/003.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/003.html.
(xhr.onreadystatechange):
(onconnect):
* web-platform-tests/workers/semantics/xhr/004.html:
* web-platform-tests/workers/semantics/xhr/004.js: Added.
(onconnect):
* web-platform-tests/workers/semantics/xhr/support/w3c-import.log:
* web-platform-tests/workers/semantics/xhr/w3c-import.log:
* web-platform-tests/workers/shared-worker-from-blob-url.window-expected.txt: Added.
* web-platform-tests/workers/shared-worker-from-blob-url.window.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
* web-platform-tests/workers/shared-worker-from-blob-url.window.js: Added.
(message_from_port):
* web-platform-tests/workers/support/SharedWorker-common.js: Added.
(generateError):
(event.ports.0.onmessage):
(onconnect):
(handleMessage):
* web-platform-tests/workers/support/SharedWorker-create-common.js: Added.
(createWorker.worker.port.onmessage):
(createWorker.worker.postMessage):
(createWorker):
* web-platform-tests/workers/support/SharedWorker-script-error.js: Added.
(event.ports.0.onmessage):
(onconnect):
(else.onerror):
(handleMessage):
* web-platform-tests/workers/support/Worker-common.js: Added.
(onmessage):
* web-platform-tests/workers/support/Worker-create-common.js: Added.
(createWorker):
* web-platform-tests/workers/support/Worker-messageport.js: Added.
(onmessage):
(pingBack):
* web-platform-tests/workers/support/Worker-run-forever.js: Added.
* web-platform-tests/workers/support/Worker-structure-message.js: Added.
(self.onmessage):
* web-platform-tests/workers/support/Worker-termination-with-port-messages.js: Added.
(echo):
(onmessage):
* web-platform-tests/workers/support/Worker-thread-multi-port.js: Added.
(onmessage):
(testPassed):
(testFailed):
* web-platform-tests/workers/support/Worker-timeout-cancel-order.js: Added.
(t1.setTimeout):
(setTimeout):
* web-platform-tests/workers/support/Worker-timeout-decreasing-order.js: Added.
(setTimeout):
* web-platform-tests/workers/support/Worker-timeout-increasing-order.js: Added.
(setTimeout):
* web-platform-tests/workers/support/WorkerGlobalScope-close.js: Added.
(else.messagePort.onmessage):
(onmessage):
* web-platform-tests/workers/support/WorkerSendingPerformanceNow.js: Added.
(calcResponse):
(self.onmessage):
(port.onmessage):
* web-platform-tests/workers/support/iframe_sw_dataUrl.html: Added.
* web-platform-tests/workers/support/importScripts-1.js: Added.
* web-platform-tests/workers/support/importScripts-2.js: Added.
* web-platform-tests/workers/support/importScripts-3.js: Added.
* web-platform-tests/workers/support/imported_script.py: Added.
(main):
* web-platform-tests/workers/support/invalidScript.js: Added.
* web-platform-tests/workers/support/name.js:
(test):
* web-platform-tests/workers/support/parent_of_nested_worker.js: Added.
(try.worker.onmessage):
(catch):
* web-platform-tests/workers/support/sync_xhr.js: Added.
(catch):
* web-platform-tests/workers/support/sync_xhr_target.xml: Added.
* web-platform-tests/workers/support/throw-on-message-Worker.js: Added.
(self.onerror):
(self.onmessage):
* web-platform-tests/workers/support/w3c-import.log:
* web-platform-tests/workers/w3c-import.log:
* web-platform-tests/workers/worker-performance.worker-expected.txt:

LayoutTests:

* TestExpectations:
* tests-options.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@249719 268f45cc-cd09-0410-ab3c-d52691b4dbfc

433 files changed:
LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/import-module-scripts.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/META.yml [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/OWNERS [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/README.md
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-constructor-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-constructor.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-propagation-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-propagation.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-script-error-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-script-error.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-simple-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-simple.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorkerPerformanceNow-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorkerPerformanceNow.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker_dataUrl-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker_dataUrl.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker.html [moved from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-messageport-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-messageport.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-multi-port-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-multi-port.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-nested-importScripts-error-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-nested-importScripts-error.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-simultaneous-errors-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-simultaneous-errors.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-structure-message-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-structure-message.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-terminate-forever-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-terminate-forever.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-termination-with-port-messages-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-termination-with-port-messages.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-cancel-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-cancel-order.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-decreasing-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-decreasing-order.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-increasing-order-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-increasing-order.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope-close-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope-close.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_close-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_close.htm [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerLocation-origin.sub.window.js [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerPerformanceNow-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/WorkerPerformanceNow.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/Worker_cross_origin_security_err.htm
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/import-in-moduleworker.html [moved from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts.html with 63% similarity]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker.html [moved from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker.html with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker-in-worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker-in-worker.html [moved from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker.html with 100% similarity]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker.html [moved from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr.html with 74% similarity]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/import.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/script.js
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/xhr-worker.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/import.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/importScripts.js
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/script-module.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/script.js
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/xhr-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/connect-event.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/connect-event.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-name.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/empty-name.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/empty.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/global-members.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/global-members.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/interface-objects.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/interface-objects.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/name.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/name.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-onmessage.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-onmessage.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-properties.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-readonly.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/same-origin.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/same-origin.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/sample_worker/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/terminate.html
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/terminate.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url.html [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/examples/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.js [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/incoming-message.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/incoming-message.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/sending-messages.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/sending-messages.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setInterval.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setInterval.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setTimeout.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setTimeout.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/close/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/members.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/members.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/returns-same-object.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/returns-same-object.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/setting-members.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/setting-members.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/handled.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/handled.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/not-handled.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/self.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/self.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/005.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/005.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/007.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/007.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/008.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/008.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/009.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/009.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/010.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/010.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/011.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/011.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/012.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/012.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/1.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/null.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/undefined.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/importScripts/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/005.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/005.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/006.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/006.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/007.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/007.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/language.html
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/language.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/navigator/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-csp.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-data-url.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-failure.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-meta.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import.any.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import.any.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import.any.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import.any.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-credentials-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-credentials.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-credentials.html.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-type.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/credentials.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-given-url-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-credentials-checker-worker.sub.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-referrer-checker-worker.sub.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-script-worker.sub.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-same-origin-credentials-checker-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-same-origin-referrer-checker-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/dynamic-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/empty-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/eval-dynamic-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/export-on-dynamic-import-script.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/export-on-dynamic-import-script.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/export-on-load-script.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/export-on-load-script.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/export-on-static-import-script.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/export-on-static-import-script.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/import-meta-url-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/import-scripts-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/import-test-cases.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/nested-static-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/new-worker-window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/post-message-on-load-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/referrer-checker.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-non-existent-script-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-remote-origin-credentials-checker-worker.sub.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-remote-origin-referrer-checker-worker.sub.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-remote-origin-script-worker.sub.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-same-origin-credentials-checker-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-same-origin-referrer-checker-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/static-import-worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/resources/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/modules/w3c-import.log [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/name-property-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/name-property.html
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker.worker.js
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_close_from_parent_worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_close_from_parent_worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_close_self.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_close_self.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_close_self.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_importScripts.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_importScripts.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_importScripts.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_sync_xhr.worker-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_sync_xhr.worker.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_sync_xhr.worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_terminate_from_document-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/nested_worker_terminate_from_document.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/non-automated/navigator-onLine.html
LayoutTests/imported/w3c/web-platform-tests/workers/non-automated/navigator-onLine.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/non-automated/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/opaque-origin.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/001.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/001.html.headers [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/001.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/001.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/002.html.headers [deleted file]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/002.js.headers [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/encodings/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/001.worker.js
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/002.worker.js
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/001.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/001.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/004-expected.txt
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/005.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/006.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/007.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/008-1.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/008.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/008.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/multiple-workers/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/navigation/001-1.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/navigation/001-1.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/navigation/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/001.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/001.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/004-1.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/001.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/001.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/run-a-worker/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/structured-clone/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/001.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/001.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/002.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/002.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/003.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/003.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/004.html
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/004.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/support/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/shared-worker-from-blob-url.window-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/shared-worker-from-blob-url.window.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/shared-worker-from-blob-url.window.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/SharedWorker-common.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/SharedWorker-create-common.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/SharedWorker-script-error.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-common.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-create-common.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-messageport.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-run-forever.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-structure-message.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-termination-with-port-messages.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-thread-multi-port.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-timeout-cancel-order.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-timeout-decreasing-order.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/Worker-timeout-increasing-order.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/WorkerGlobalScope-close.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/WorkerSendingPerformanceNow.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/iframe_sw_dataUrl.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/importScripts-1.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/importScripts-2.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/importScripts-3.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/imported_script.py [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/invalidScript.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/name.js
LayoutTests/imported/w3c/web-platform-tests/workers/support/parent_of_nested_worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/sync_xhr.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/sync_xhr_target.xml [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/throw-on-message-Worker.js [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/workers/support/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/w3c-import.log
LayoutTests/imported/w3c/web-platform-tests/workers/worker-performance.worker-expected.txt
LayoutTests/tests-options.json

index a25c452..cc32eb6 100644 (file)
@@ -1,3 +1,13 @@
+2019-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Re-sync workers web platform tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=201629
+
+        Reviewed by Alex Christensen.
+
+        * TestExpectations:
+        * tests-options.json:
+
 2019-09-10  Youenn Fablet  <youenn@apple.com>
 
         Remove MediaStreamPrivate::scheduleDeferredTask
index 4ad14e0..2bfbcc5 100644 (file)
@@ -298,6 +298,9 @@ imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.html [ S
 imported/w3c/web-platform-tests/workers/semantics/multiple-workers/003.html [ Skip ]
 imported/w3c/web-platform-tests/workers/semantics/multiple-workers/005.html [ Skip ]
 imported/w3c/web-platform-tests/workers/Worker_cross_origin_security_err.htm [ Skip ]
+imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event.html [ Skip ]
+imported/w3c/web-platform-tests/workers/modules/dedicated-worker-import-referrer.html [ Skip ]
+imported/w3c/web-platform-tests/workers/modules/dedicated-worker-options-credentials.html [ Skip ]
 
 imported/w3c/web-platform-tests/workers/constructors/SharedWorker [ Skip ]
 imported/w3c/web-platform-tests/workers/SharedWorker_blobUrl.html [ Skip ]
index 9e404ef..18ea768 100644 (file)
@@ -1,3 +1,566 @@
+2019-09-10  Chris Dumez  <cdumez@apple.com>
+
+        Re-sync workers web platform tests from upstream
+        https://bugs.webkit.org/show_bug.cgi?id=201629
+
+        Reviewed by Alex Christensen.
+
+        Re-sync workers web platform tests from upstream 603a271948a7162.
+
+        * web-platform-tests/workers/META.yml: Added.
+        * web-platform-tests/workers/OWNERS: Removed.
+        * web-platform-tests/workers/README.md:
+        * web-platform-tests/workers/SharedWorker-constructor-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker-constructor.html: Added.
+        * web-platform-tests/workers/SharedWorker-detach-frame-in-error-event-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker-detach-frame-in-error-event.html: Added.
+        * web-platform-tests/workers/SharedWorker-exception-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker-exception-propagation-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker-exception-propagation.html: Added.
+        * web-platform-tests/workers/SharedWorker-exception.html: Added.
+        * web-platform-tests/workers/SharedWorker-script-error-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker-script-error.html: Added.
+        * web-platform-tests/workers/SharedWorker-simple-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker-simple.html: Added.
+        * web-platform-tests/workers/SharedWorkerPerformanceNow-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorkerPerformanceNow.html: Added.
+        * web-platform-tests/workers/SharedWorker_dataUrl-expected.txt: Added.
+        * web-platform-tests/workers/SharedWorker_dataUrl.html: Added.
+        * web-platform-tests/workers/Worker-call.worker-expected.txt: Added.
+        * web-platform-tests/workers/Worker-call.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/Worker-call.worker.js: Added.
+        (test):
+        * web-platform-tests/workers/Worker-messageport-expected.txt: Added.
+        * web-platform-tests/workers/Worker-messageport.html: Added.
+        * web-platform-tests/workers/Worker-multi-port-expected.txt: Added.
+        * web-platform-tests/workers/Worker-multi-port.html: Added.
+        * web-platform-tests/workers/Worker-nested-importScripts-error-expected.txt: Added.
+        * web-platform-tests/workers/Worker-nested-importScripts-error.html: Added.
+        * web-platform-tests/workers/Worker-simultaneous-errors-expected.txt: Added.
+        * web-platform-tests/workers/Worker-simultaneous-errors.html: Added.
+        * web-platform-tests/workers/Worker-structure-message-expected.txt: Added.
+        * web-platform-tests/workers/Worker-structure-message.html: Added.
+        * web-platform-tests/workers/Worker-terminate-forever-expected.txt: Added.
+        * web-platform-tests/workers/Worker-terminate-forever.html: Added.
+        * web-platform-tests/workers/Worker-termination-with-port-messages-expected.txt: Added.
+        * web-platform-tests/workers/Worker-termination-with-port-messages.html: Added.
+        * web-platform-tests/workers/Worker-timeout-cancel-order-expected.txt: Added.
+        * web-platform-tests/workers/Worker-timeout-cancel-order.html: Added.
+        * web-platform-tests/workers/Worker-timeout-decreasing-order-expected.txt: Added.
+        * web-platform-tests/workers/Worker-timeout-decreasing-order.html: Added.
+        * web-platform-tests/workers/Worker-timeout-increasing-order-expected.txt: Added.
+        * web-platform-tests/workers/Worker-timeout-increasing-order.html: Added.
+        * web-platform-tests/workers/WorkerGlobalScope-close-expected.txt: Added.
+        * web-platform-tests/workers/WorkerGlobalScope-close.html: Added.
+        * web-platform-tests/workers/WorkerGlobalScope_close-expected.txt: Removed.
+        * web-platform-tests/workers/WorkerGlobalScope_close.htm: Removed.
+        * web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt: Added.
+        * web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js: Added.
+        * web-platform-tests/workers/WorkerLocation-origin.sub.window.js: Removed.
+        * web-platform-tests/workers/WorkerPerformanceNow-expected.txt: Added.
+        * web-platform-tests/workers/WorkerPerformanceNow.html: Added.
+        * web-platform-tests/workers/Worker_cross_origin_security_err.htm:
+        * web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/import-in-moduleworker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts.html.
+        * web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker.html: Added.
+        * web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/importScripts-in-worker.html: Added.
+        * web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker.html.
+        * web-platform-tests/workers/baseurl/alpha/w3c-import.log:
+        * web-platform-tests/workers/baseurl/alpha/worker-in-worker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/worker-in-worker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker.html.
+        * web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr.html.
+        * web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker.html: Added.
+        * web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt: Added.
+        * web-platform-tests/workers/baseurl/alpha/xhr-in-worker.html: Added.
+        * web-platform-tests/workers/baseurl/beta/import.py: Added.
+        (main):
+        * web-platform-tests/workers/baseurl/beta/script.js:
+        * web-platform-tests/workers/baseurl/beta/w3c-import.log:
+        * web-platform-tests/workers/baseurl/beta/xhr-worker.py: Added.
+        (main):
+        * web-platform-tests/workers/baseurl/gamma/import.js: Added.
+        * web-platform-tests/workers/baseurl/gamma/importScripts.js:
+        (test):
+        * web-platform-tests/workers/baseurl/gamma/script-module.js: Added.
+        * web-platform-tests/workers/baseurl/gamma/script.js:
+        * web-platform-tests/workers/baseurl/gamma/w3c-import.log:
+        * web-platform-tests/workers/baseurl/gamma/xhr-worker.js: Added.
+        * web-platform-tests/workers/constructors/SharedWorker/connect-event.html:
+        * web-platform-tests/workers/constructors/SharedWorker/connect-event.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/constructors/SharedWorker/dummy-name.html:
+        * web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.html:
+        * web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.js: Added.
+        * web-platform-tests/workers/constructors/SharedWorker/empty-name.html:
+        * web-platform-tests/workers/constructors/SharedWorker/empty.js: Added.
+        * web-platform-tests/workers/constructors/SharedWorker/global-members.html:
+        * web-platform-tests/workers/constructors/SharedWorker/global-members.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/constructors/SharedWorker/interface-objects.html:
+        * web-platform-tests/workers/constructors/SharedWorker/interface-objects.js: Added.
+        (handleCall):
+        (onconnect):
+        * web-platform-tests/workers/constructors/SharedWorker/name.html:
+        * web-platform-tests/workers/constructors/SharedWorker/name.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/constructors/SharedWorker/port-onmessage.html:
+        * web-platform-tests/workers/constructors/SharedWorker/port-onmessage.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/constructors/SharedWorker/port-properties.html:
+        * web-platform-tests/workers/constructors/SharedWorker/port-readonly.html:
+        * web-platform-tests/workers/constructors/SharedWorker/same-origin.html:
+        * web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.html:
+        * web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.html.
+        (onconnect):
+        * web-platform-tests/workers/constructors/SharedWorker/w3c-import.log:
+        * web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror-expected.txt:
+        * web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.html:
+        * web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.js: Added.
+        * web-platform-tests/workers/constructors/Worker/Worker-constructor-expected.txt: Added.
+        * web-platform-tests/workers/constructors/Worker/Worker-constructor.html: Added.
+        * web-platform-tests/workers/constructors/Worker/no-arguments-ctor-expected.txt: Removed.
+        * web-platform-tests/workers/constructors/Worker/no-arguments-ctor.html: Removed.
+        * web-platform-tests/workers/constructors/Worker/resolve-empty-string-expected.txt: Removed.
+        * web-platform-tests/workers/constructors/Worker/resolve-empty-string.html: Removed.
+        * web-platform-tests/workers/constructors/Worker/same-origin.html:
+        * web-platform-tests/workers/constructors/Worker/sample_worker/w3c-import.log:
+        * web-platform-tests/workers/constructors/Worker/terminate.html:
+        * web-platform-tests/workers/constructors/Worker/terminate.js: Added.
+        (f):
+        * web-platform-tests/workers/constructors/Worker/unresolvable-url-expected.txt: Removed.
+        * web-platform-tests/workers/constructors/Worker/unresolvable-url.html: Removed.
+        * web-platform-tests/workers/constructors/Worker/w3c-import.log:
+        * web-platform-tests/workers/dedicated-worker-from-blob-url.window-expected.txt: Added.
+        * web-platform-tests/workers/dedicated-worker-from-blob-url.window.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/dedicated-worker-from-blob-url.window.js: Added.
+        (message_from_port):
+        * web-platform-tests/workers/examples/fetch_tests_from_worker-expected.txt: Added.
+        * web-platform-tests/workers/examples/fetch_tests_from_worker.html: Added.
+        * web-platform-tests/workers/examples/fetch_tests_from_worker.js: Added.
+        (test):
+        * web-platform-tests/workers/examples/general.worker-expected.txt: Added.
+        * web-platform-tests/workers/examples/general.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/examples/general.worker.js: Added.
+        (test):
+        * web-platform-tests/workers/examples/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/w3c-import.log.
+        * web-platform-tests/workers/interfaces.worker-expected.txt: Removed.
+        * web-platform-tests/workers/interfaces.worker.js: Removed.
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.js: Added.
+        (onmessage):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.js: Added.
+        (onmessage):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt: Added.
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html.
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.js: Added.
+        (onmessage):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-expected.txt:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.js: Added.
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.js: Added.
+        (onmessage):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.html:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.js: Added.
+        (i.catch):
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/w3c-import.log:
+        * web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/w3c-import.log:
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting.html:
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/getting.js: Added.
+        (switch):
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting.html:
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/setting.js: Added.
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/name/w3c-import.log:
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.html:
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/onconnect.js: Added.
+        (catch):
+        (try.self.onconnect.handleEvent):
+        (f):
+        * web-platform-tests/workers/interfaces/SharedWorkerGlobalScope/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/incoming-message.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/incoming-message.js: Added.
+        (onmessage):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/sending-messages.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/sending-messages.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setInterval.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setInterval.js: Added.
+        (interval1.setInterval):
+        (interval2.setInterval):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setTimeout.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/setTimeout.js: Added.
+        (x):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/close/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/members.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/members.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-expected.txt:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module-expected.txt: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-module.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.html.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker-expected.txt: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect-sharedworker.html: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/redirect.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/returns-same-object.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/returns-same-object.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/setting-members.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/setting-members.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/location/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror-expected.txt:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/exception-in-onerror.js: Added.
+        (onerror):
+        (x):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/handled.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/handled.js: Added.
+        (onerror):
+        (x):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/not-handled.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/not-handled.js: Added.
+        (onerror):
+        (x):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.js: Added.
+        (x):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/onerror/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/self.html:
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/self.js: Added.
+        (check):
+        * web-platform-tests/workers/interfaces/WorkerGlobalScope/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.js: Added.
+        (setTimeout):
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/002.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/002.js: Added.
+        (t.setTimeout):
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/003.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/003.js: Added.
+        (setInterval):
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/004.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/004.js: Added.
+        (t.setInterval):
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005-expected.txt: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/001.html.
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/005.js: Added.
+        (t.setInterval):
+        * web-platform-tests/workers/interfaces/WorkerUtils/WindowTimers/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/003.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/003.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/004.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/005.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/005.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/006.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/007.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/007.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/008.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/008.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/009.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/009.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/010.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/010.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/011.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/011.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/012.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/012.js: Added.
+        (catch):
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/1.headers: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/null.headers: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/undefined.headers: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/importScripts/w3c-import.log:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/002.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/002.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/003.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/003.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/004.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/004.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/005.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/005.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/006.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/006.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/007.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/007.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/language.html:
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/language.js: Added.
+        * web-platform-tests/workers/interfaces/WorkerUtils/navigator/w3c-import.log:
+        * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.js: Added.
+        (import_blob_url_test):
+        * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.worker-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-blob-url.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/modules/dedicated-worker-import-csp-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-csp.html: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-data-url.any-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.js: Added.
+        (import_data_url_test):
+        * web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.worker-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-data-url.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/modules/dedicated-worker-import-failure-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-failure.html: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-meta-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-meta.html: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-referrer-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import-referrer.html: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import.any-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import.any.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/modules/dedicated-worker-import.any.js: Added.
+        (import_test):
+        * web-platform-tests/workers/modules/dedicated-worker-import.any.worker-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-import.any.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/modules/dedicated-worker-options-credentials-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-options-credentials.html: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-options-credentials.html.headers: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-options-type-expected.txt: Added.
+        * web-platform-tests/workers/modules/dedicated-worker-options-type.html: Added.
+        * web-platform-tests/workers/modules/resources/credentials.py: Added.
+        (main):
+        * web-platform-tests/workers/modules/resources/dynamic-import-and-then-static-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-given-url-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-credentials-checker-worker.sub.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-referrer-checker-worker.sub.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-remote-origin-script-worker.sub.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-same-origin-credentials-checker-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-same-origin-referrer-checker-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/dynamic-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/empty-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/eval-dynamic-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/export-on-dynamic-import-script.js: Added.
+        * web-platform-tests/workers/modules/resources/export-on-dynamic-import-script.js.headers: Added.
+        * web-platform-tests/workers/modules/resources/export-on-load-script.js: Added.
+        * web-platform-tests/workers/modules/resources/export-on-load-script.js.headers: Added.
+        * web-platform-tests/workers/modules/resources/export-on-static-import-script.js: Added.
+        * web-platform-tests/workers/modules/resources/export-on-static-import-script.js.headers: Added.
+        * web-platform-tests/workers/modules/resources/import-meta-url-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/import-scripts-worker.js: Added.
+        (catch):
+        * web-platform-tests/workers/modules/resources/import-test-cases.js: Added.
+        * web-platform-tests/workers/modules/resources/nested-dynamic-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/nested-static-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/new-worker-window.html: Added.
+        * web-platform-tests/workers/modules/resources/post-message-on-load-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/referrer-checker.py: Added.
+        (main):
+        * web-platform-tests/workers/modules/resources/static-import-and-then-dynamic-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-non-existent-script-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-remote-origin-credentials-checker-worker.sub.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-remote-origin-referrer-checker-worker.sub.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-remote-origin-script-worker.sub.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-same-origin-credentials-checker-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-same-origin-referrer-checker-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/static-import-worker.js: Added.
+        * web-platform-tests/workers/modules/resources/w3c-import.log: Added.
+        * web-platform-tests/workers/modules/w3c-import.log: Added.
+        * web-platform-tests/workers/name-property-expected.txt:
+        * web-platform-tests/workers/name-property.html:
+        * web-platform-tests/workers/nested_worker.worker.js:
+        (async_test):
+        * web-platform-tests/workers/nested_worker_close_from_parent_worker-expected.txt: Added.
+        * web-platform-tests/workers/nested_worker_close_from_parent_worker.html: Added.
+        * web-platform-tests/workers/nested_worker_close_self.worker-expected.txt: Added.
+        * web-platform-tests/workers/nested_worker_close_self.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/nested_worker_close_self.worker.js: Added.
+        (async_test):
+        * web-platform-tests/workers/nested_worker_importScripts.worker-expected.txt: Added.
+        * web-platform-tests/workers/nested_worker_importScripts.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/nested_worker_importScripts.worker.js: Added.
+        (async_test):
+        * web-platform-tests/workers/nested_worker_sync_xhr.worker-expected.txt: Added.
+        * web-platform-tests/workers/nested_worker_sync_xhr.worker.html: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/nested_worker_sync_xhr.worker.js: Added.
+        (async_test):
+        * web-platform-tests/workers/nested_worker_terminate_from_document-expected.txt: Added.
+        * web-platform-tests/workers/nested_worker_terminate_from_document.html: Added.
+        * web-platform-tests/workers/non-automated/navigator-onLine.html:
+        * web-platform-tests/workers/non-automated/navigator-onLine.js: Added.
+        (string_appeared_here.in.self.onmessage):
+        (else.e.ports.0.onmessage):
+        (else.onconnect):
+        * web-platform-tests/workers/non-automated/w3c-import.log:
+        * web-platform-tests/workers/opaque-origin.html:
+        * web-platform-tests/workers/semantics/encodings/001.html:
+        * web-platform-tests/workers/semantics/encodings/001.html.headers: Removed.
+        * web-platform-tests/workers/semantics/encodings/001.js: Added.
+        * web-platform-tests/workers/semantics/encodings/001.js.headers: Added.
+        * web-platform-tests/workers/semantics/encodings/002.html:
+        * web-platform-tests/workers/semantics/encodings/002.html.headers: Removed.
+        * web-platform-tests/workers/semantics/encodings/002.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/encodings/002.js.headers: Added.
+        * web-platform-tests/workers/semantics/encodings/003.html:
+        * web-platform-tests/workers/semantics/encodings/003.js: Added.
+        * web-platform-tests/workers/semantics/encodings/004.html:
+        * web-platform-tests/workers/semantics/encodings/004.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/encodings/w3c-import.log:
+        * web-platform-tests/workers/semantics/interface-objects/001.worker-expected.txt:
+        * web-platform-tests/workers/semantics/interface-objects/001.worker.js:
+        * web-platform-tests/workers/semantics/interface-objects/002.worker-expected.txt:
+        * web-platform-tests/workers/semantics/interface-objects/002.worker.js:
+        * web-platform-tests/workers/semantics/interface-objects/003.html:
+        * web-platform-tests/workers/semantics/interface-objects/003.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/003.html.
+        (onconnect):
+        * web-platform-tests/workers/semantics/interface-objects/004.html:
+        * web-platform-tests/workers/semantics/interface-objects/004.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/interface-objects/004.html.
+        (onconnect):
+        * web-platform-tests/workers/semantics/interface-objects/w3c-import.log:
+        * web-platform-tests/workers/semantics/multiple-workers/001.html:
+        * web-platform-tests/workers/semantics/multiple-workers/001.js: Added.
+        (string_appeared_here.in.self.onmessage):
+        (else.e.ports.0.onmessage):
+        (else.onconnect):
+        * web-platform-tests/workers/semantics/multiple-workers/002.html:
+        * web-platform-tests/workers/semantics/multiple-workers/002.js: Added.
+        * web-platform-tests/workers/semantics/multiple-workers/003.html:
+        * web-platform-tests/workers/semantics/multiple-workers/003.js: Added.
+        (location.hash.string_appeared_here.w2.onmessage):
+        (else.w3.onmessage):
+        (else):
+        * web-platform-tests/workers/semantics/multiple-workers/004-expected.txt:
+        * web-platform-tests/workers/semantics/multiple-workers/004.html:
+        * web-platform-tests/workers/semantics/multiple-workers/005.html:
+        * web-platform-tests/workers/semantics/multiple-workers/006.html:
+        * web-platform-tests/workers/semantics/multiple-workers/007.html:
+        * web-platform-tests/workers/semantics/multiple-workers/008-1.html:
+        * web-platform-tests/workers/semantics/multiple-workers/008.html:
+        * web-platform-tests/workers/semantics/multiple-workers/008.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/multiple-workers/w3c-import.log:
+        * web-platform-tests/workers/semantics/navigation/001-1.html:
+        * web-platform-tests/workers/semantics/navigation/001-1.js: Added.
+        (setInterval):
+        * web-platform-tests/workers/semantics/navigation/w3c-import.log:
+        * web-platform-tests/workers/semantics/reporting-errors/001.html:
+        * web-platform-tests/workers/semantics/reporting-errors/001.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/001.html.
+        (onerror):
+        (onconnect):
+        * web-platform-tests/workers/semantics/reporting-errors/002.html:
+        * web-platform-tests/workers/semantics/reporting-errors/002.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/reporting-errors/002.html.
+        (onconnect):
+        * web-platform-tests/workers/semantics/reporting-errors/003.html:
+        * web-platform-tests/workers/semantics/reporting-errors/003.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/reporting-errors/004-1.html:
+        * web-platform-tests/workers/semantics/reporting-errors/004.html:
+        * web-platform-tests/workers/semantics/reporting-errors/004.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/reporting-errors/w3c-import.log:
+        * web-platform-tests/workers/semantics/run-a-worker/001.html:
+        * web-platform-tests/workers/semantics/run-a-worker/001.js: Added.
+        * web-platform-tests/workers/semantics/run-a-worker/002.html:
+        * web-platform-tests/workers/semantics/run-a-worker/002.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/run-a-worker/003.html:
+        * web-platform-tests/workers/semantics/run-a-worker/w3c-import.log:
+        * web-platform-tests/workers/semantics/structured-clone/w3c-import.log:
+        * web-platform-tests/workers/semantics/xhr/001.html:
+        * web-platform-tests/workers/semantics/xhr/001.js: Added.
+        (xhr.onreadystatechange):
+        * web-platform-tests/workers/semantics/xhr/002.html:
+        * web-platform-tests/workers/semantics/xhr/002.js: Added.
+        * web-platform-tests/workers/semantics/xhr/003.html:
+        * web-platform-tests/workers/semantics/xhr/003.js: Copied from LayoutTests/imported/w3c/web-platform-tests/workers/semantics/xhr/003.html.
+        (xhr.onreadystatechange):
+        (onconnect):
+        * web-platform-tests/workers/semantics/xhr/004.html:
+        * web-platform-tests/workers/semantics/xhr/004.js: Added.
+        (onconnect):
+        * web-platform-tests/workers/semantics/xhr/support/w3c-import.log:
+        * web-platform-tests/workers/semantics/xhr/w3c-import.log:
+        * web-platform-tests/workers/shared-worker-from-blob-url.window-expected.txt: Added.
+        * web-platform-tests/workers/shared-worker-from-blob-url.window.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.html.
+        * web-platform-tests/workers/shared-worker-from-blob-url.window.js: Added.
+        (message_from_port):
+        * web-platform-tests/workers/support/SharedWorker-common.js: Added.
+        (generateError):
+        (event.ports.0.onmessage):
+        (onconnect):
+        (handleMessage):
+        * web-platform-tests/workers/support/SharedWorker-create-common.js: Added.
+        (createWorker.worker.port.onmessage):
+        (createWorker.worker.postMessage):
+        (createWorker):
+        * web-platform-tests/workers/support/SharedWorker-script-error.js: Added.
+        (event.ports.0.onmessage):
+        (onconnect):
+        (else.onerror):
+        (handleMessage):
+        * web-platform-tests/workers/support/Worker-common.js: Added.
+        (onmessage):
+        * web-platform-tests/workers/support/Worker-create-common.js: Added.
+        (createWorker):
+        * web-platform-tests/workers/support/Worker-messageport.js: Added.
+        (onmessage):
+        (pingBack):
+        * web-platform-tests/workers/support/Worker-run-forever.js: Added.
+        * web-platform-tests/workers/support/Worker-structure-message.js: Added.
+        (self.onmessage):
+        * web-platform-tests/workers/support/Worker-termination-with-port-messages.js: Added.
+        (echo):
+        (onmessage):
+        * web-platform-tests/workers/support/Worker-thread-multi-port.js: Added.
+        (onmessage):
+        (testPassed):
+        (testFailed):
+        * web-platform-tests/workers/support/Worker-timeout-cancel-order.js: Added.
+        (t1.setTimeout):
+        (setTimeout):
+        * web-platform-tests/workers/support/Worker-timeout-decreasing-order.js: Added.
+        (setTimeout):
+        * web-platform-tests/workers/support/Worker-timeout-increasing-order.js: Added.
+        (setTimeout):
+        * web-platform-tests/workers/support/WorkerGlobalScope-close.js: Added.
+        (else.messagePort.onmessage):
+        (onmessage):
+        * web-platform-tests/workers/support/WorkerSendingPerformanceNow.js: Added.
+        (calcResponse):
+        (self.onmessage):
+        (port.onmessage):
+        * web-platform-tests/workers/support/iframe_sw_dataUrl.html: Added.
+        * web-platform-tests/workers/support/importScripts-1.js: Added.
+        * web-platform-tests/workers/support/importScripts-2.js: Added.
+        * web-platform-tests/workers/support/importScripts-3.js: Added.
+        * web-platform-tests/workers/support/imported_script.py: Added.
+        (main):
+        * web-platform-tests/workers/support/invalidScript.js: Added.
+        * web-platform-tests/workers/support/name.js:
+        (test):
+        * web-platform-tests/workers/support/parent_of_nested_worker.js: Added.
+        (try.worker.onmessage):
+        (catch):
+        * web-platform-tests/workers/support/sync_xhr.js: Added.
+        (catch):
+        * web-platform-tests/workers/support/sync_xhr_target.xml: Added.
+        * web-platform-tests/workers/support/throw-on-message-Worker.js: Added.
+        (self.onerror):
+        (self.onmessage):
+        * web-platform-tests/workers/support/w3c-import.log:
+        * web-platform-tests/workers/w3c-import.log:
+        * web-platform-tests/workers/worker-performance.worker-expected.txt:
+
 2019-09-10  Youenn Fablet  <youenn@apple.com>
 
         Remove MediaStreamPrivate::scheduleDeferredTask
index 442e507..12d94a9 100644 (file)
@@ -1,4 +1,9 @@
-CONSOLE MESSAGE: line 27: ReferenceError: Can't find variable: testCases
 
-FAIL Tests for module import: ServiceWorker ReferenceError: Can't find variable: testCases
+FAIL Static import. promise_test: Unhandled rejection with value: object "TypeError: SyntaxError: Unexpected token '*'. import call expects exactly one argument."
+FAIL Nested static import. promise_test: Unhandled rejection with value: object "TypeError: SyntaxError: Unexpected token '*'. import call expects exactly one argument."
+FAIL Static import and then dynamic import. promise_test: Unhandled rejection with value: object "TypeError: SyntaxError: Unexpected token '*'. import call expects exactly one argument."
+FAIL Dynamic import. assert_array_equals: value is "Failed to do dynamic import: Error: Could not import the module './export-on-load-script.js'.", expected array
+FAIL Nested dynamic import. assert_array_equals: value is "Failed to do dynamic import: Error: Could not import the module './export-on-dynamic-import-script.js'.", expected array
+FAIL Dynamic import and then static import. assert_array_equals: value is "Failed to do dynamic import: Error: Could not import the module './export-on-static-import-script.js'.", expected array
+FAIL eval(import()). assert_array_equals: value is "Failed to do dynamic import: Error: Could not import the module './export-on-load-script.js'.", expected array
 
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/META.yml b/LayoutTests/imported/w3c/web-platform-tests/workers/META.yml
new file mode 100644 (file)
index 0000000..a7297d3
--- /dev/null
@@ -0,0 +1,6 @@
+spec: https://html.spec.whatwg.org/multipage/workers.html
+suggested_reviewers:
+  - zqzhang
+  - caitp
+  - jdm
+  - annevk
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/OWNERS b/LayoutTests/imported/w3c/web-platform-tests/workers/OWNERS
deleted file mode 100644 (file)
index 066bbc5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-@zqzhang
-@chunywang
-@caitp
-@jdm
-@annevk
index 78cc743..58ee7cc 100644 (file)
@@ -1,2 +1,140 @@
+# Worker WPT tests
+
 These are the workers (`Worker`, `SharedWorker`) tests for the
 [Web workers chapter of the HTML Standard](https://html.spec.whatwg.org/multipage/workers.html).
+
+See also
+[testharness.js API > Web Workers](https://web-platform-tests.org/writing-tests/testharness-api.html#web-workers).
+
+Note that because workers are defined in the HTML Standard, the idlharness.js
+tests are in [/html/dom]([/html/dom) instead of here.
+
+## Writing `*.any.js`
+
+The easiest and most recommended way to write tests for workers
+is to create .any.js-style tests.
+
+Official doc:
+[WPT > File Name Flags > Test Features](https://web-platform-tests.org/writing-tests/file-names.html#test-features).
+
+- Standard `testharness.js`-style can be used (and is enforced).
+- The same test can be run on window and many types of workers.
+- All glue code are automatically generated.
+- No need to care about how to create and communicate with each type of workers,
+  thanks to `fetch_tests_from_worker` in `testharness.js`.
+
+Converting existing tests into `.any.js`-style also has benefits:
+
+- Multiple tests can be merged into one.
+- Tests written for window can be run on workers
+  with a very low development cost.
+
+### How to write tests
+
+If you write `testharness.js`-based tests in `foo.any.js` and
+specify types of workers to be tested,
+the test can run on any of dedicated, shared and service workers.
+
+See `examples/general.any.js` for example.
+
+Even for testing specific features in a specific type of workers
+(e.g. shared worker's `onconnect`), `.any.js`-style tests can be used.
+
+See `examples/onconnect.any.js` for example.
+
+### How to debug tests
+
+Whether each individual test passed or failed,
+and its assertion failures (if any) are all reported in the final results.
+
+`console.log()` might not appear in the test results and
+thus might not be useful for printf debugging.
+For example, in Chromium, this message
+
+- Appears (in stderr) on a window or a dedicated worker, but
+- Does NOT appear on a shared worker or a service worker.
+
+### How it works
+
+`.any.js`-style tests use
+`fetch_tests_from_worker` functionality of `testharness.js`.
+
+The WPT test server generates necessary glue code
+(including generated Document HTML and worker top-level scripts).
+See
+[serve.py](https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py)
+for the actual glue code.
+
+Note that `.any.js` file is not the worker top-level script,
+and currently we cannot set response headers to the worker top-level script,
+e.g. to set Referrer Policy of the workers.
+
+## Writing `*.worker.js`
+
+Similar to `.any.js`, you can also write `.worker.js`
+for tests only for dedicated workers.
+Almost the same as `.any.js`, except for the things listed below.
+
+Official doc:
+[WPT > File Name Flags > Test Features](https://web-platform-tests.org/writing-tests/file-names.html#test-features).
+
+### How to write tests
+
+You have to write two things manually (which is generated in `.any.js` tests):
+
+- `importScripts("/resources/testharness.js");` at the beginning.
+- `done();` at the bottom.
+
+Note: Even if you write `async_test()` or `promise_test()`,
+this global `done()` is always needed
+(this is different from async_test's `done()`)
+for dedicated workers and shared workers.
+See official doc:
+[testharness.js API > Determining when all tests are complete](https://web-platform-tests.org/writing-tests/testharness-api.html#determining-when-all-tests-are-complete).
+
+See `examples/general.worker.js` for example.
+
+### How it works
+
+`.worker.js`-style tests also use
+`fetch_tests_from_worker` functionality of `testharness.js`.
+
+The WPT test server generates glue code in Document HTML-side,
+but not for worker top-level scripts.
+This is why you have to manually write `importScripts()` etc.
+See
+[serve.py](https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py)
+for the actual glue code.
+
+Unlike `*.any.js` cases, the `*.worker.js` is the worker top-level script.
+
+## Using `fetch_tests_from_worker`
+
+If you need more flexibility,
+writing tests using `fetch_tests_from_worker` is the way to go.
+For example, when
+
+- Additional processing is needed on the parent Document.
+- Workers should be created in a specific way.
+- You are writing non-WPT tests using `testharness.js`.
+
+You have to write the main HTMLs and the worker scripts,
+but most of the glue code needed for running tests on workers
+are provided by `fetch_tests_from_worker`.
+
+### How to write tests
+
+See
+
+- `examples/fetch_tests_from_worker.html` and
+  `examples/fetch_tests_from_worker.js`.
+
+## Writing the whole tests manually
+
+If `fetch_tests_from_worker` isn't suitable for your specific case
+(which should be rare but might be still possible),
+you have to write the whole tests,
+including the main Document HTML, worker scripts,
+and message passing code between them.
+
+TODO: Supply the templates for writing this kind of tests.
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-constructor-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-constructor-expected.txt
new file mode 100644 (file)
index 0000000..7c1f716
--- /dev/null
@@ -0,0 +1,12 @@
+
+FAIL Test toString exception propagated correctly. assert_throws: toString exception not propagagted function "function () {
+                    new SharedWorker({toString:function(){throw new Error()}}, "name") }" threw object "ReferenceError: Can't find variable: SharedWorker" ("ReferenceError") expected object "Error" ("Error")
+FAIL Test recursive worker creation results in exception. assert_throws: Trying to create workers recursively did not result in an exception. function "function () {
+                    var foo = {toString:function(){new Worker(foo)}}
+                    new SharedWorker(foo, name); }" threw object "ReferenceError: Can't find variable: SharedWorker" ("ReferenceError") expected object "RangeError" ("RangeError")
+FAIL Test SharedWorker creation without arguments results in exception. assert_throws: Invoking SharedWorker constructor without arguments did not result in an exception. function "function () { new SharedWorker(); }" threw object "ReferenceError: Can't find variable: SharedWorker" ("ReferenceError") expected object "TypeError" ("TypeError")
+FAIL Test SharedWorker constructor without a name does not result in an exception. assert_unreached: Constructor failed when no name is passed: (ReferenceError: Can't find variable: SharedWorker) Reached unreachable code
+FAIL Test SharedWorker constructor with null name does not result in an exception. assert_unreached: Constructor failed when null name is passed: (ReferenceError: Can't find variable: SharedWorker) Reached unreachable code
+FAIL Test SharedWorker constructor with undefined name does not result in an exception. assert_unreached: Constructor failed when undefined name is passed: (ReferenceError: Can't find variable: SharedWorker) Reached unreachable code
+FAIL Test SharedWorker constructor suceeds. assert_unreached: Invoking SharedWorker constructor resulted in an exception: (ReferenceError: Can't find variable: SharedWorker) Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-constructor.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-constructor.html
new file mode 100644 (file)
index 0000000..2bfe7d9
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Test SharedWorker constructor functionality.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+
+test(() => {
+  assert_throws(new Error(),
+                function() {
+                    new SharedWorker({toString:function(){throw new Error()}}, "name") },
+                "toString exception not propagagted");
+}, "Test toString exception propagated correctly.");
+
+test(() => {
+  assert_throws(new RangeError(),
+                function() {
+                    var foo = {toString:function(){new Worker(foo)}}
+                    new SharedWorker(foo, name); },
+                "Trying to create workers recursively did not result in an exception.");
+}, "Test recursive worker creation results in exception.");
+
+test(() => {
+  assert_throws(new TypeError(),
+                function() { new SharedWorker(); },
+                "Invoking SharedWorker constructor without arguments did not result in an exception.");
+}, "Test SharedWorker creation without arguments results in exception.");
+
+test(() => {
+  try {
+    var worker = new SharedWorker("support/SharedWorker-common.js");
+  } catch (ex) {
+    assert_unreached("Constructor failed when no name is passed: (" + ex + ")");
+  }
+}, "Test SharedWorker constructor without a name does not result in an exception.");
+
+test(() => {
+  try {
+    var worker = new SharedWorker("support/SharedWorker-common.js", null);
+  } catch (ex) {
+    assert_unreached("Constructor failed when null name is passed: (" + ex + ")");
+  }
+}, "Test SharedWorker constructor with null name does not result in an exception.");
+
+test(() => {
+  try {
+    var worker = new SharedWorker("support/SharedWorker-common.js", undefined);
+  } catch (ex) {
+    assert_unreached("Constructor failed when undefined name is passed: (" + ex + ")");
+  }
+}, "Test SharedWorker constructor with undefined name does not result in an exception.");
+
+test(() => {
+  try {
+    var worker = new SharedWorker("support/SharedWorker-common.js", "name");
+  } catch (ex) {
+    assert_unreached("Invoking SharedWorker constructor resulted in an exception: (" + ex + ")");
+  }
+}, "Test SharedWorker constructor suceeds.");
+
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event-expected.txt
new file mode 100644 (file)
index 0000000..66a0923
--- /dev/null
@@ -0,0 +1,7 @@
+CONSOLE MESSAGE: line 1: ReferenceError: Can't find variable: SharedWorker
+
+
+Harness Error (TIMEOUT), message = null
+
+TIMEOUT Test frame detach in shared worker's error handler Test timed out
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-detach-frame-in-error-event.html
new file mode 100644 (file)
index 0000000..7363265
--- /dev/null
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<title>Test frame detach in shared worker's error handler</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+<iframe id="frame"></iframe>
+</body>
+<script>
+promise_test(t => {
+  const frame = document.getElementById('frame');
+
+  const promise = new Promise(resolve => {
+    window.detachFrame = () => {
+      frame.remove();
+      resolve();
+    };
+  });
+
+  // Start a new worker with an invalid script in the frame, and detach the
+  // frame in the worker's error handler. This shouldn't crash.
+  const s = frame.contentWindow.document.createElement('script');
+  s.innerHTML = "const worker = new SharedWorker('error');" +
+                "worker.onerror = () => { window.parent.detachFrame(); };";
+  frame.contentWindow.document.body.appendChild(s);
+
+  return promise;
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-expected.txt
new file mode 100644 (file)
index 0000000..5769304
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL This test checks whether exceptions in SharedWorkers are logged to the parent document. An exception should be logged to the error console. Can't find variable: SharedWorker
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-propagation-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-propagation-expected.txt
new file mode 100644 (file)
index 0000000..3c53425
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Uncaught error in shared worker should not propagate to window Can't find variable: SharedWorker
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-propagation.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception-propagation.html
new file mode 100644 (file)
index 0000000..5823a19
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Uncaught error in shared worker should not propagate to window</title>
+<link rel="help" href="https://html.spec.whatwg.org/multipage/workers.html#runtime-script-errors-2">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/SharedWorker-create-common.js"></script>
+<script>
+// Suppress the default handling of the error event so that a failure
+// manifests as a failed test and not a harness error.
+setup({ allow_uncaught_exception: true });
+
+async_test(function(t) {
+    addEventListener("error", t.unreached_func("error event fired"));
+    var worker = createWorker();
+    worker.postMessage("throw");
+    worker.postMessage("ping");
+    var pongs = 0;
+    worker.onmessage = function(evt) {
+        // Wait for response from ping - that's how we know we have thrown the exception.
+        if (evt.data == "PASS: Received ping message") {
+            pongs++;
+            if (pongs == 1) {
+                // Send another "ping" message and wait for the response before
+                // ending the test, so that any error propagation that is now
+                // in flight will have finished.
+                worker.postMessage("ping");
+            } else {
+                t.done();
+            }
+        }
+    };
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-exception.html
new file mode 100644 (file)
index 0000000..28b8584
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<title>This test checks whether exceptions in SharedWorkers are logged to the parent document. An exception should be logged to the error console.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/SharedWorker-create-common.js"></script>
+<script>
+// Ignore any error event fired on window in this test. This is tested
+// separately in SharedWorker-exception-propagation.html.
+setup({ allow_uncaught_exception: true });
+
+async_test(function(t) {
+    var worker = createWorker();
+    worker.postMessage("throw");
+    worker.postMessage("ping");
+    worker.onmessage = function(evt) {
+        // Wait for response from ping - that's how we know we have thrown the exception.
+        if (evt.data == "PASS: Received ping message") {
+            t.done();
+        }
+    };
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-script-error-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-script-error-expected.txt
new file mode 100644 (file)
index 0000000..ec4f989
--- /dev/null
@@ -0,0 +1,4 @@
+
+FAIL Test script error unhandled. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: SharedWorker"
+FAIL Test script error handled. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: SharedWorker"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-script-error.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-script-error.html
new file mode 100644 (file)
index 0000000..3c93cc0
--- /dev/null
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<title>Test SharedWorker script error handling functionality.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(t => {
+    let worker;
+
+    return new Promise((resolve) => {
+        worker = new SharedWorker("support/SharedWorker-script-error.js");
+        // Shared workers should only invoke onerror for loading errors.
+        worker.onerror = function(evt) {
+            assert_unreached("FAIL: onerror invoked for a script error.");
+        };
+        worker.port.postMessage("unhandledError");
+        worker.port.onmessage = resolve;
+    }).then(e => {
+        assert_equals(e.data, "SUCCESS: unhandled error generated");
+    });
+}, 'Test script error unhandled.')
+
+promise_test(t => {
+    let worker;
+
+    return new Promise((resolve) => {
+        worker = new SharedWorker("support/SharedWorker-script-error.js");
+        // Shared workers should only invoke onerror for loading errors.
+        worker.onerror = function(evt) {
+            assert_unreached("FAIL: onerror invoked for a script error.");
+        };
+        worker.port.postMessage("handledError");
+        worker.port.onmessage = resolve;
+    }).then(e => {
+        assert_equals(e.data, "SUCCESS: error handled via onerror");
+    });
+}, 'Test script error handled.')
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-simple-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-simple-expected.txt
new file mode 100644 (file)
index 0000000..313b62f
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Test simple shared worker construction case. promise_test: Unhandled rejection with value: object "ReferenceError: Can't find variable: SharedWorker"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-simple.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker-simple.html
new file mode 100644 (file)
index 0000000..7cd3f4f
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>Test simple shared worker construction case.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(t => {
+    let worker;
+
+    return new Promise(resolve => {
+        worker = new SharedWorker('support/SharedWorker-common.js', 'name');
+        worker.port.postMessage("ping");
+        worker.port.onmessage = resolve;
+    }).then(e => {
+        assert_equals(e.data, "PASS: Received ping message");
+    });
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorkerPerformanceNow-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorkerPerformanceNow-expected.txt
new file mode 100644 (file)
index 0000000..27019e0
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL performance.now() exists in shared workers and reports reasonable times Can't find variable: SharedWorker
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorkerPerformanceNow.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorkerPerformanceNow.html
new file mode 100644 (file)
index 0000000..a784293
--- /dev/null
@@ -0,0 +1,47 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>window.performance.now in shared workers</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<script>
+async_test(function(t) {
+    const worker = new SharedWorker('support/WorkerSendingPerformanceNow.js');
+    worker.port.onmessage = t.step_func(event => {
+        const results = event.data;
+        assert_true(results.length == 4);
+        assert_equals(results[0], 'undefined',
+          'workerStart not defined on the Worker object');
+        assert_equals(results[1], 'object', 'self.performance is defined');
+        assert_equals(results[2], 'function', 'self.performance.now is defined');
+        assert_greater_than(results[3], 0, 'Time in the worker should be positive');
+        assert_greater_than(window.performance.now(), results[3], 'Time in the worker should be before the current time in the main document');
+        setupIframe();
+    });
+    window.iframeStartTime = 0;
+    window.test_iframe = function(event) {
+        const workerTime = event.data[3];
+        assert_greater_than(workerTime, window.iframeStartTime,
+            'Time since origin time should be greater in the shared worker than the iframe');
+        t.done();
+    }
+    function setupIframe() {
+        const iframe = document.createElement('iframe');
+        document.body.appendChild(iframe);
+        const script = iframe.contentWindow.document.createElement('script');
+        script.innerHTML =
+            'window.top.iframeStartTime = window.performance.now();' +
+            'const worker = new SharedWorker("support/WorkerSendingPerformanceNow.js");' +
+            'worker.port.onmessage = function(event) {' +
+            '    window.top.test_iframe(event);' +
+            '};' +
+            'worker.port.postMessage("");';
+        iframe.contentWindow.document.body.appendChild(script);
+    }
+    worker.port.postMessage('');
+}, 'performance.now() exists in shared workers and reports reasonable times');
+</script>
+</body>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker_dataUrl-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker_dataUrl-expected.txt
new file mode 100644 (file)
index 0000000..027eb41
--- /dev/null
@@ -0,0 +1,9 @@
+CONSOLE MESSAGE: line 6: ReferenceError: Can't find variable: SharedWorker
+CONSOLE MESSAGE: line 6: ReferenceError: Can't find variable: SharedWorker
+
+
+Harness Error (TIMEOUT), message = null
+
+TIMEOUT Data URL not shared by cross-origin SharedWorkers Test timed out
+NOTRUN Data URLs shared by same-origin SharedWorkers 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker_dataUrl.html b/LayoutTests/imported/w3c/web-platform-tests/workers/SharedWorker_dataUrl.html
new file mode 100644 (file)
index 0000000..c1dec27
--- /dev/null
@@ -0,0 +1,63 @@
+<!DOCTYPE html>
+<title>Shared Worker: Data URL cross-origin checks</title>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<body>
+</body>
+<script>
+
+function dirname(path) {
+  return path.replace(/\/[^\/]*$/, '/');
+}
+
+promise_test(t => {
+  return new Promise(function(resolve) {
+    let count = 0;
+    onmessage = e => {
+      assert_equals(e.data, 1);
+      if (++count == 2) {
+        resolve(true);
+      }
+    };
+
+    let iframeA = document.createElement('iframe');
+    document.body.appendChild(iframeA);
+    iframeA.src =  get_host_info().HTTP_REMOTE_ORIGIN +
+                   dirname(location.pathname) +
+                   "support/iframe_sw_dataUrl.html";
+
+    let iframeB = document.createElement('iframe');
+    document.body.appendChild(iframeB);
+    iframeB.src =  get_host_info().HTTPS_REMOTE_ORIGIN +
+                   dirname(location.pathname) +
+                   "support/iframe_sw_dataUrl.html";
+  });
+}, 'Data URL not shared by cross-origin SharedWorkers');
+
+promise_test(t => {
+  return new Promise(function(resolve) {
+    let count = 0;
+    onmessage = e => {
+      assert_equals(e.data, ++count);
+      if (count == 2) {
+        resolve(true);
+      }
+    };
+
+    let iframeA = document.createElement('iframe');
+    document.body.appendChild(iframeA);
+    iframeA.src =  get_host_info().HTTP_ORIGIN +
+                   dirname(location.pathname) +
+                   "support/iframe_sw_dataUrl.html";
+
+    let iframeB = document.createElement('iframe');
+    document.body.appendChild(iframeB);
+    iframeB.src =  get_host_info().HTTP_ORIGIN +
+                   dirname(location.pathname) +
+                   "support/iframe_sw_dataUrl.html";
+  });
+}, 'Data URLs shared by same-origin SharedWorkers');
+
+</script>
+</html>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker-expected.txt
new file mode 100644 (file)
index 0000000..10b4b3b
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Test calling functions from WorkerContext. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-call.worker.js
new file mode 100644 (file)
index 0000000..ba07498
--- /dev/null
@@ -0,0 +1,12 @@
+importScripts("/resources/testharness.js");
+test(() => {
+  try {
+    postMessage("SUCCESS: postMessage() called directly");
+    postMessage.call(null, "SUCCESS: postMessage() invoked via postMessage.call()");
+    var saved = postMessage;
+    saved("SUCCESS: postMessage() called via intermediate variable");
+  } catch (ex) {
+    assert_unreached("FAIL: unexpected exception (" + ex + ") received while calling functions from the worker context.");
+  }
+}, 'Test calling functions from WorkerContext.');
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-messageport-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-messageport-expected.txt
new file mode 100644 (file)
index 0000000..74d1f98
--- /dev/null
@@ -0,0 +1,6 @@
+
+PASS Test sending messages to workers with no port. 
+PASS Test sending message to a worker on a port. 
+PASS Test getting messages from a worker on a port. 
+PASS Test sending many messages to workers using ports. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-messageport.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-messageport.html
new file mode 100644 (file)
index 0000000..f7734b2
--- /dev/null
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<title>Test that pages and workers can send MessagePorts to one another.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function(t) {
+  var worker = new Worker("support/Worker-messageport.js");
+
+  // Send messages with and without ports to the worker to make sure it gets them.
+  worker.postMessage("noport");
+  worker.onmessage = t.step_func_done(evt => {
+    assert_equals(evt.data, "PASS: evt.ports = [] as expected");
+  });
+}, 'Test sending messages to workers with no port.');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-messageport.js");
+  var channel = new MessageChannel();
+
+  worker.postMessage("port", [channel.port1]);
+  worker.onmessage = t.step_func(evt => {
+    assert_equals(evt.data, "PASS: Received message port");
+  });
+
+  // Send a message on the new port to make sure it gets to the worker.
+  channel.port2.postMessage("ping");
+
+  // Wait for the response.
+  channel.port2.onmessage = t.step_func_done(evt => {
+    assert_equals(evt.data, "pong");
+  });
+  channel.port2.start();
+}, 'Test sending message to a worker on a port.');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-messageport.js");
+  var channel = new MessageChannel();
+
+  worker.onmessage = t.step_func(evt => {
+    assert_equals(evt.data, "port");
+    assert_equals(String(evt.ports), "[object MessagePort]");
+    assert_equals(evt.ports.length, 1);
+    evt.ports[0].postMessage("ping");
+    evt.ports[0].onmessage = t.step_func_done(evt => {
+      assert_equals(evt.data, "pong");
+    });
+    evt.ports[0].start();
+  });
+  worker.postMessage("getport");
+}, 'Test getting messages from a worker on a port.');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-messageport.js");
+  var channel = new MessageChannel();
+  worker.onmessage = t.step_func(evt => { gotSpam(channel.port1); });
+  worker.postMessage("spam", [channel.port2]);
+
+  function gotSpam(port) {
+    var spamCount = 0;
+    port.onmessage = t.step_func(evt => {
+      assert_equals(evt.data, spamCount);
+      spamCount++;
+      if (spamCount == 1000) {
+        t.done();
+      }
+    });
+  }
+}, 'Test sending many messages to workers using ports.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-multi-port-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-multi-port-expected.txt
new file mode 100644 (file)
index 0000000..fdb9cb7
--- /dev/null
@@ -0,0 +1,15 @@
+
+PASS Test postMessage with no port. 
+PASS Test postMessage with no arguments. 
+PASS Test postMessage with no ports and empty array. 
+PASS Test postMessage with two ports. 
+PASS Test empty postMessage throws exception. 
+PASS Test postMessage with null ports throws exception. 
+FAIL Test postMessage with incorrect ports throws exception assert_throws: postMessage with incorrect ports should throw exception. function "function () { worker.postMessage("notAPort",
+                                                [channel.port1, {},
+                                                 channel.port2]); }" threw object "DataCloneError: The object can not be cloned." ("DataCloneError") expected object "TypeError" ("TypeError")
+FAIL Test postMessage without sequence throws exception assert_throws: postMessage without sequence should throw exception. function "function () { worker.postMessage("notASequence", [{length: 3}]) }" threw object "DataCloneError: The object can not be cloned." ("DataCloneError") expected object "TypeError" ("TypeError")
+FAIL Test postMessage on channel with previous failed postMessage calls. assert_throws: postMessage with incorrect ports should throw exception. function "function () { worker.postMessage("notAPort",
+                                                [channel.port1, {},
+                                                 channel.port2]); }" threw object "DataCloneError: The object can not be cloned." ("DataCloneError") expected object "TypeError" ("TypeError")
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-multi-port.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-multi-port.html
new file mode 100644 (file)
index 0000000..9a89583
--- /dev/null
@@ -0,0 +1,86 @@
+<!DOCTYPE html>
+<title>Test sending multiple ports through Worker.postMessage.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function(t) {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  worker.onmessage = t.step_func_done(function(evt) {
+    assert_true(evt.data.startsWith('PASS'));
+  });
+  worker.postMessage("noport");
+}, 'Test postMessage with no port.');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  worker.onmessage = t.step_func_done(function(evt) {
+    assert_true(evt.data.startsWith('PASS'));
+  });
+  worker.postMessage("noargs");
+}, 'Test postMessage with no arguments.');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  worker.onmessage = t.step_func_done(function(evt) {
+    assert_true(evt.data.startsWith('PASS'));
+  });
+  worker.postMessage("zero ports", []);
+}, 'Test postMessage with no ports and empty array.');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  var channel = new MessageChannel();
+  worker.onmessage = t.step_func_done(function(evt) {
+    assert_true(evt.data.startsWith('PASS'));
+  });
+  worker.postMessage("two ports", [channel.port1, channel.port2]);
+}, 'Test postMessage with two ports.');
+
+test(() => {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  assert_throws(new TypeError(),
+                function() { worker.postMessage(); },
+                'Empty postMessage should throw exception.');
+}, 'Test empty postMessage throws exception.');
+
+test(() => {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  var channel = new MessageChannel();
+  assert_throws(new TypeError(),
+                function() { worker.postMessage("null port",
+                                                [channel.port1, null,
+                                                 channel.port2]); },
+                'postMessage with null ports should throw exception.');
+}, 'Test postMessage with null ports throws exception.');
+
+test(() => {
+  var worker = new Worker("support/Worker-thread-multi-port.js")
+  var channel = new MessageChannel();
+  assert_throws(new TypeError(),
+                function() { worker.postMessage("notAPort",
+                                                [channel.port1, {},
+                                                 channel.port2]); },
+                'postMessage with incorrect ports should throw exception.');
+}, 'Test postMessage with incorrect ports throws exception');
+
+test(() => {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  assert_throws(new TypeError(),
+                function() { worker.postMessage("notASequence", [{length: 3}]) },
+                'postMessage without sequence should throw exception.');
+}, 'Test postMessage without sequence throws exception');
+
+async_test(function(t) {
+  var worker = new Worker("support/Worker-thread-multi-port.js");
+  var channel = new MessageChannel();
+  assert_throws(new TypeError(),
+                function() { worker.postMessage("notAPort",
+                                                [channel.port1, {},
+                                                 channel.port2]); },
+                'postMessage with incorrect ports should throw exception.');
+  worker.onmessage = t.step_func_done(function(evt) {
+    assert_true(evt.data.startsWith('PASS'));
+  });
+  worker.postMessage("failed ports", [channel.port1, channel.port2]);
+}, 'Test postMessage on channel with previous failed postMessage calls.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-nested-importScripts-error-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-nested-importScripts-error-expected.txt
new file mode 100644 (file)
index 0000000..4b66af6
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Tests that errors from the import scripts come from the expected file. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-nested-importScripts-error.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-nested-importScripts-error.html
new file mode 100644 (file)
index 0000000..bd96c83
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<title>This tests that errors from nested importScripts have the expected provenance.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(t => {
+  let worker;
+
+  return new Promise((resolve) => {
+    worker = new Worker("support/importScripts-1.js");
+    worker.onerror = resolve;
+  }).then(e => {
+    assert_equals(e.type, "error");
+    assert_true(e.filename.indexOf('invalidScript.js') >= 0);
+    e.preventDefault();
+  });
+}, 'Tests that errors from the import scripts come from the expected file.')
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-simultaneous-errors-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-simultaneous-errors-expected.txt
new file mode 100644 (file)
index 0000000..056f17d
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Test simultaneous errors on workers. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-simultaneous-errors.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-simultaneous-errors.html
new file mode 100644 (file)
index 0000000..4339f2e
--- /dev/null
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Test simultaneous errors on workers.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(t => {
+    var workers = 4;
+    var promises = [];
+
+    for (i = 0; i < workers; ++i) {
+        var worker = new Worker('support/throw-on-message-Worker.js');
+        promises.push(new Promise(function(resolve, reject) {
+            var error = 0;
+            worker.onmessage = function(event) {
+                if (event.data === 'second')
+                    resolve(error);
+                else if (event.data === 'error')
+                    ++error;
+            }
+        }));
+        worker.postMessage('first');
+        worker.postMessage('second');
+    }
+
+    return Promise.all(promises).then(e => {
+        var sum = 0;
+        for (var key in e) {
+            sum += e[key]
+        }
+        assert_equals(sum, workers);
+    });
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-structure-message-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-structure-message-expected.txt
new file mode 100644 (file)
index 0000000..46d4a0d
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Tests sending structure message to/from worker. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-structure-message.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-structure-message.html
new file mode 100644 (file)
index 0000000..9eb12dc
--- /dev/null
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<title>Test that pages and workers can send Structure Message to one another.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(t => {
+  let worker;
+
+  return new Promise(resolve => {
+    worker = new Worker("support/Worker-structure-message.js");
+    worker.onmessage = resolve;
+    worker.postMessage({
+      operation: 'find-edges',
+      input: new ArrayBuffer(20),
+      threshold: 0.6
+    });
+  }).then(evt => {
+    assert_false(evt.data.startsWith('FAIL'));
+    return new Promise(resolve => worker.onmessage = resolve);
+  }).then(evt => {
+    assert_equals(evt.data.operation, 'find-edges');
+    assert_true(ArrayBuffer.prototype.isPrototypeOf(evt.data.input));
+    assert_equals(evt.data.input.byteLength, 20);
+    assert_equals(evt.data.threshold, 0.6);
+  });
+}, 'Tests sending structure message to/from worker.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-terminate-forever-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-terminate-forever-expected.txt
new file mode 100644 (file)
index 0000000..392dca2
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Tests terminating a worker that is trying to run forever. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-terminate-forever.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-terminate-forever.html
new file mode 100644 (file)
index 0000000..3528bb6
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<title>Test Worker.terminate() for a worker that tries to run forever.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+test((t) => {
+  var worker = new Worker('support/Worker-run-forever.js');
+  worker.terminate();
+  t.step_timeout(function() { t.done(); }, 500);
+}, 'Tests terminating a worker that is trying to run forever.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-termination-with-port-messages-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-termination-with-port-messages-expected.txt
new file mode 100644 (file)
index 0000000..6393e51
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS This test terminates a worker when there are many undelivered MessagePort messages still waiting to be dispatched into the Worker Context. This causes termination of JS execution and test should not try to dispatch the remaining messages. Test succeeds if it does not hang or crash (if worker thread is running in the separate process, that process could hang or crash). 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-termination-with-port-messages.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-termination-with-port-messages.html
new file mode 100644 (file)
index 0000000..bc19784
--- /dev/null
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<title>This test terminates a worker when there are many undelivered MessagePort messages still waiting to be dispatched into the Worker Context. This causes termination of JS execution and test should not try to dispatch the remaining messages. Test succeeds if it does not hang or crash (if worker thread is running in the separate process, that process could hang or crash).</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+async_test(function(t) {
+    var worker = new Worker("support/Worker-termination-with-port-messages.js");
+    var channel = new MessageChannel();
+
+    channel.port2.onmessage = function(evt)
+    {
+        // On first message back from worker, terminate it.
+        worker.terminate();
+        t.done();
+    }
+    channel.port2.start();
+
+    worker.postMessage("", [channel.port1]);
+    for (i = 0; i < 1000; i++)
+        channel.port2.postMessage("message to worker");
+});
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-cancel-order-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-cancel-order-expected.txt
new file mode 100644 (file)
index 0000000..0fc453e
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Tests setting and canceling timeout in workers. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-cancel-order.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-cancel-order.html
new file mode 100644 (file)
index 0000000..78d930d
--- /dev/null
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<title>Test setTimeOut,cancelTimeout in Web Workers.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test(t => {
+  let worker
+
+  return new Promise(resolve => {
+    worker = new Worker('support/Worker-timeout-cancel-order.js');
+    worker.postMessage('start');
+    worker.onmessage = resolve;
+  }).then(evt => {
+    assert_equals(evt.data, 2, 'Timeout not canceled');
+  });
+}, 'Tests setting and canceling timeout in workers.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-decreasing-order-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-decreasing-order-expected.txt
new file mode 100644 (file)
index 0000000..19846d3
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Tests timeouts on the worker are fired in decreasing order. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-decreasing-order.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-decreasing-order.html
new file mode 100644 (file)
index 0000000..f459461
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<title>Test setTimeOut,fired in decreasing order in Web Workers.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test (t => {
+  let worker;
+
+  return new Promise(resolve => {
+    worker = new Worker('support/Worker-timeout-decreasing-order.js');
+    worker.postMessage('start');
+    worker.onmessage = resolve;
+  }).then(evt => {
+    assert_equals(evt.data, 1);
+    return (new Promise(resolve => worker.onmessage = resolve));
+  }).then(evt => {
+    assert_equals(evt.data, 2);
+    return (new Promise(resolve => worker.onmessage = resolve));
+  }).then(evt => {
+    assert_equals(evt.data, 3);
+  });
+}, 'Tests timeouts on the worker are fired in decreasing order.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-increasing-order-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-increasing-order-expected.txt
new file mode 100644 (file)
index 0000000..0724cdf
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Tests timeouts on the worker are fired in increasing order. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-increasing-order.html b/LayoutTests/imported/w3c/web-platform-tests/workers/Worker-timeout-increasing-order.html
new file mode 100644 (file)
index 0000000..34b0294
--- /dev/null
@@ -0,0 +1,23 @@
+<!DOCTYPE html>
+<title>Test setTimeOut,fired in increasing order in Web Workers.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+promise_test (t => {
+  let worker;
+
+  return new Promise(resolve => {
+    worker = new Worker('support/Worker-timeout-increasing-order.js');
+    worker.postMessage('start');
+    worker.onmessage = resolve;
+  }).then(evt => {
+    assert_equals(evt.data, 1);
+    return (new Promise(resolve => worker.onmessage = resolve));
+  }).then(evt => {
+    assert_equals(evt.data, 2);
+    return (new Promise(resolve => worker.onmessage = resolve));
+  }).then(evt => {
+    assert_equals(evt.data, 3);
+  });
+}, 'Tests timeouts on the worker are fired in increasing order.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope-close-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope-close-expected.txt
new file mode 100644 (file)
index 0000000..35bf967
--- /dev/null
@@ -0,0 +1,8 @@
+CONSOLE MESSAGE: line 27: ReferenceError: Can't find variable: nonExistentFunction
+
+PASS Test type of close function. 
+PASS Test sending a message after closing. 
+PASS Test errors are delivered after close. 
+PASS Test workers do not deliver pending events. 
+PASS Test terminating a worker after close. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope-close.html b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope-close.html
new file mode 100644 (file)
index 0000000..a193a34
--- /dev/null
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<title>Test WorkerGlobalScope.close functionality.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+setup({ allow_uncaught_exception: true });
+
+async_test(function(t) {
+  var worker = new Worker('support/WorkerGlobalScope-close.js');
+  worker.postMessage("typeofClose");
+    worker.onmessage = t.step_func_done(function(evt) {
+    assert_equals(evt.data, "typeof close: function");
+    });
+}, 'Test type of close function.');
+
+async_test(function(t) {
+  var worker = new Worker('support/WorkerGlobalScope-close.js');
+  worker.postMessage("ping");
+    worker.onmessage = t.step_func(function(evt) {
+    assert_equals(evt.data, "pong");
+    // Tell the worker to close, then send a followup message. This message
+    // should not be delivered, since that would require JS to invoke the
+    //  onmessage handler, which does not happen after the JS fragment with
+    // 'close()' in it exits. So, the 'ping' should not come back as 'pong'.
+    worker.postMessage("close");
+    worker.postMessage("ping");
+      worker.onmessage = t.step_func(function(evt) {
+      assert_not_equals(evt.data, "pong");
+      t.step_timeout(function() { t.done(); }, 500);
+    });
+  });
+}, 'Test sending a message after closing.');
+
+async_test(function(t) {
+  var worker = new Worker('support/WorkerGlobalScope-close.js');
+  worker.postMessage("closeWithError");
+  worker.onerror = function(event) {
+    t.done()
+  };
+}, 'Test errors are delivered after close.');
+
+async_test(function(t) {
+  var worker = new Worker('support/WorkerGlobalScope-close.js');
+  worker.postMessage("closeWithPendingEvents");
+  worker.onmessage = t.step_func(function(evt) {
+    assert_unreached("Pending events should not fire: " + evt.data);
+  });
+  worker.onerror = t.step_func(function(evt) {
+    assert_unreached("Pending events should not fire:" + evt.message);
+  });
+  t.step_timeout(function() { t.done(); }, 500);
+}, 'Test workers do not deliver pending events.');
+
+async_test(function(t) {
+  var worker = new Worker('support/WorkerGlobalScope-close.js');
+  worker.postMessage("close");
+  worker.onmessage = function(evt) {
+    assert_equals(evt.data, "Should be delivered");
+    // Give worker a chance to close first, then terminate it.
+    t.step_timeout(function() {
+      worker.terminate();
+      t.done();
+    }, 500);
+  };
+}, 'Test terminating a worker after close.');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_close-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_close-expected.txt
deleted file mode 100644 (file)
index 110df45..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-PASS  WorkerGlobalScope close(): clear events queue  
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_close.htm b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_close.htm
deleted file mode 100644 (file)
index 2ad5205..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html>
-<title> WorkerGlobalScope close(): clear events queue </title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id=log></div>
-<script>
-async_test(function(t) {
-  var worker = new Worker('./support/WorkerClose.js');
-  worker.onmessage = t.step_func(function(e) {
-    assert_equals(e.data, "ping");
-    worker.onmessage = t.unreached_func("Unexpected message event");
-    worker.postMessage("pong");
-    setTimeout(t.step_func_done(), 100);
-  });
-  worker.postMessage("ping");
-});
-</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker-expected.txt
new file mode 100644 (file)
index 0000000..83cb4cd
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Untitled Can't find variable: requestAnimationFrame
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerGlobalScope_requestAnimationFrame.tentative.worker.js
new file mode 100644 (file)
index 0000000..e1b0b9f
--- /dev/null
@@ -0,0 +1,19 @@
+importScripts("/resources/testharness.js");
+
+async_test(t => {
+  const res = [];
+  requestAnimationFrame(t.step_func(dt => {
+    res.push(dt);
+    requestAnimationFrame(t.step_func(dt => {
+      res.push(dt);
+      requestAnimationFrame(t.step_func_done(dt => {
+        res.push(dt);
+        assert_equals(res.length, 3);
+        assert_less_than(res[0], res[1]);
+        assert_less_than(res[1], res[2]);
+      }));
+    }));
+  }));
+});
+
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerLocation-origin.sub.window.js b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerLocation-origin.sub.window.js
deleted file mode 100644 (file)
index 7e80810..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-async_test(t => {
-  const frame = document.createElement("iframe"),
-        asciiOrigin = location.protocol + "//{{domains[天気の良い日]}}:" + location.port,
-        path = new URL("support/WorkerLocation-origin.html", location).pathname;
-  frame.src = asciiOrigin + path;
-  self.onmessage = t.step_func_done(e => {
-    assert_equals(e.data.origin, asciiOrigin);
-  });
-  document.body.appendChild(frame);
-  t.add_cleanup(() => frame.remove());
-}, "workerLocation.origin must use ASCII code points");
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerPerformanceNow-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerPerformanceNow-expected.txt
new file mode 100644 (file)
index 0000000..2a293c5
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS performance.now() exists in dedicated workers and reports reasonable times 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerPerformanceNow.html b/LayoutTests/imported/w3c/web-platform-tests/workers/WorkerPerformanceNow.html
new file mode 100644 (file)
index 0000000..467dad4
--- /dev/null
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html>
+<head>
+<title>performance.now in dedicated workers</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+</head>
+<body>
+<script>
+async_test(function(t) {
+  const worker = new Worker('support/WorkerSendingPerformanceNow.js');
+  worker.onmessage = t.step_func_done(event => {
+    const results = event.data;
+    assert_true(results.length == 4);
+    assert_equals(results[0], 'undefined',
+      'workerStart not defined on the Worker object');
+    assert_equals(results[1], 'object', "self.performance is defined");
+    assert_equals(results[2], 'function', "self.performance.now is defined");
+    assert_greater_than(results[3], 0, "Time in the worker should be positive");
+    assert_greater_than(window.performance.now(), results[3], "Time in the worker should be before the current time in the main document");
+  });
+  worker.postMessage('');
+}, 'performance.now() exists in dedicated workers and reports reasonable times');
+</script>
+</body>
+</html>
index d57dc29..1a5e260 100644 (file)
@@ -1,5 +1,6 @@
 <!DOCTYPE html>
-<title> Worker cross-origin URL </title>
+<title>Worker cross-origin URL</title>
+<meta name="timeout" content="long">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id=log></div>
@@ -11,7 +12,20 @@ async_test(function(t) {
       assert_true(e instanceof Event);
     });
   } catch (e) {
-    t.step_func_done(function(e) { assert_true(true); });
+    assert_throws("SecurityError", () => {throw e}, "DOMExceptions thrown on cross-origin Worker construction must be SecurityErrors");
+    t.done();
   }
-});
+}, "Cross-origin classic workers should fail to fetch");
+
+async_test(function(t) {
+  try {
+    var w = new Worker("ftp://example.org/support/WorkerBasic.js", {type: "module"});
+    w.onerror = t.step_func_done(function(e) {
+      assert_true(e instanceof Event);
+    });
+  } catch (e) {
+    assert_throws("SecurityError", () => {throw e}, "DOMExceptions thrown on cross-origin module Worker construction must be SecurityErrors");
+    t.done();
+  }
+}, "Cross-origin module workers should fail to fetch");
 </script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/import-in-moduleworker-expected.txt
new file mode 100644 (file)
index 0000000..f41c8f3
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 1: SyntaxError: Unexpected identifier 'r'. import call expects exactly one argument.
+
+FAIL Base URL in module dedicated workers: import assert_unreached: Got error event Reached unreachable code
+
@@ -1,13 +1,13 @@
 <!doctype html>
 <meta charset=utf-8>
-<title>Base URL in workers: importScripts</title>
+<title>Base URL in module dedicated workers: import</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
 async_test(function() {
-  var worker = new Worker("../beta/importScripts.py");
+  var worker = new Worker("../beta/import.py", {type: "module"});
   worker.onmessage = this.step_func_done(function(e) {
-    assert_equals(e.data, "gamma");
+    assert_equals(e.data, "gamma/script-module.js");
   });
   worker.onerror = this.unreached_func("Got error event");
 });
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker-expected.txt
new file mode 100644 (file)
index 0000000..0cb81f9
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 7: ReferenceError: Can't find variable: SharedWorker
+
+FAIL Base URL in classic shared workers: importScripts ReferenceError: Can't find variable: SharedWorker
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker.html
new file mode 100644 (file)
index 0000000..6a4111c
--- /dev/null
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic shared workers: importScripts</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new SharedWorker("../beta/importScripts.py"));
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker-expected.txt
new file mode 100644 (file)
index 0000000..b41a31a
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Untitled assert_equals: expected "gamma/script.js" but got "beta/script.js"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker.html
new file mode 100644 (file)
index 0000000..55907bf
--- /dev/null
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic dedicated workers: importScripts</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new Worker("../beta/importScripts.py"));
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker-expected.txt
new file mode 100644 (file)
index 0000000..5731583
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 1: ReferenceError: Can't find variable: SharedWorker
+
+FAIL Base URL in workers: new SharedWorker() assert_unreached: Got error event Reached unreachable code
+
index 7f60346..a508690 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -14,7 +14,11 @@ Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
-/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts.html
-/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker.html
-/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker.html
-/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/import-in-moduleworker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-sharedworker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/importScripts-in-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/sharedworker-in-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker-in-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker-in-worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/worker-in-worker-expected.txt
new file mode 100644 (file)
index 0000000..23823db
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 1: ReferenceError: Can't find variable: Worker
+
+FAIL Base URL in workers: new Worker() assert_unreached: Got error event Reached unreachable code
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-moduleworker-expected.txt
new file mode 100644 (file)
index 0000000..83f367f
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Base URL in module dedicated workers: XHR assert_equals: expected "gamma\n" but got "beta\n"
+
@@ -1,11 +1,11 @@
 <!doctype html>
 <meta charset=utf-8>
-<title>Base URL in workers: XHR</title>
+<title>Base URL in module dedicated workers: XHR</title>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script>
 async_test(function() {
-  var worker = new Worker("../beta/xhr.py");
+  var worker = new Worker("../beta/xhr.py", {type: "module"});
   worker.onmessage = this.step_func_done(function(e) {
     assert_equals(e.data, "gamma\n");
   });
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker-expected.txt
new file mode 100644 (file)
index 0000000..0281265
--- /dev/null
@@ -0,0 +1,4 @@
+CONSOLE MESSAGE: line 7: ReferenceError: Can't find variable: SharedWorker
+
+FAIL Base URL in classic shared workers: XHR ReferenceError: Can't find variable: SharedWorker
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-sharedworker.html
new file mode 100644 (file)
index 0000000..43921b8
--- /dev/null
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic shared workers: XHR</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new SharedWorker("../beta/xhr-worker.py"));
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker-expected.txt
new file mode 100644 (file)
index 0000000..d4e8b8f
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Untitled assert_equals: expected "gamma\n" but got "beta\n"
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/alpha/xhr-in-worker.html
new file mode 100644 (file)
index 0000000..bc58b9b
--- /dev/null
@@ -0,0 +1,8 @@
+<!doctype html>
+<meta charset=utf-8>
+<title>Base URL in classic dedicated workers: XHR</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new Worker("../beta/xhr-worker.py"));
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/import.py b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/import.py
new file mode 100644 (file)
index 0000000..db18c83
--- /dev/null
@@ -0,0 +1,3 @@
+def main(request, response):
+    return (302, "Moved"), [("Location", "../gamma/import.js")], "postMessage('executed redirecting script');"
+
index 35e09d3..d7f13ff 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -14,6 +14,7 @@ Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/import.py
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/importScripts.py
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/script.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/sharedworker.py
@@ -21,4 +22,5 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/subworker.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/test.txt
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/worker.py
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/xhr-worker.py
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/xhr.py
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/xhr-worker.py b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/beta/xhr-worker.py
new file mode 100644 (file)
index 0000000..7727053
--- /dev/null
@@ -0,0 +1,2 @@
+def main(request, response):
+    return (302, "Moved"), [("Location", "../gamma/xhr-worker.js")], "postMessage('executed redirecting script');"
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/import.js b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/import.js
new file mode 100644 (file)
index 0000000..1246913
--- /dev/null
@@ -0,0 +1,2 @@
+import r from "./script-module.js";
+postMessage(r);
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/script-module.js b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/script-module.js
new file mode 100644 (file)
index 0000000..88d5f82
--- /dev/null
@@ -0,0 +1 @@
+export default 'gamma/script-module.js';
index aec85b2..f07ef28 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -14,11 +14,14 @@ Property values requiring vendor prefixes:
 None
 ------------------------------------------------------------------------
 List of files:
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/import.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/importScripts.js
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/script-module.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/script.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/sharedworker.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/subsharedworker.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/subworker.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/test.txt
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/worker.js
+/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/xhr-worker.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/xhr.js
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/xhr-worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/baseurl/gamma/xhr-worker.js
new file mode 100644 (file)
index 0000000..a9d7782
--- /dev/null
@@ -0,0 +1,8 @@
+importScripts('/resources/testharness.js');
+test(t => {
+  var x = new XMLHttpRequest();
+  x.open("GET", "test.txt", false);
+  x.send();
+  assert_equals(x.response, "gamma\n");
+});
+done();
index a9719d9..a8dc714 100644 (file)
@@ -1,9 +1,3 @@
-<!--
-onconnect = function(e) {
-  e.ports[0].postMessage([e.data === '', e instanceof MessageEvent, e.ports.length == 1]);
-};
-/*
--->
 <!doctype html>
 <title>connect event</title>
 <script src="/resources/testharness.js"></script>
@@ -11,7 +5,7 @@ onconnect = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new SharedWorker('#');
+  var worker = new SharedWorker('connect-event.js');
   worker.port.addEventListener('message', this.step_func(function(e) {
     assert_true(e.data[0], "e.data === ''");
     assert_true(e.data[1], "e instanceof MessageEvent");
@@ -20,7 +14,4 @@ onconnect = function(e) {
   }), false);
   worker.port.start();
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/connect-event.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/connect-event.js
new file mode 100644 (file)
index 0000000..c397152
--- /dev/null
@@ -0,0 +1,3 @@
+onconnect = function(e) {
+  e.ports[0].postMessage([e.data === '', e instanceof MessageEvent, e.ports.length == 1]);
+};
\ No newline at end of file
index 9e27329..59097c7 100644 (file)
@@ -1,6 +1,3 @@
-<!--
-/*
--->
 <!doctype html>
 <title>creating a dummy shared worker with name "foo"</title>
 <link rel=help href="http://www.whatwg.org/html/#dom-sharedworker">
@@ -9,9 +6,6 @@
 <div id="log"></div>
 <script>
 test(function() {
-  var worker = new SharedWorker('#', 'foo');
+  var worker = new SharedWorker('empty.js', 'foo');
 });
 </script>
-<!--
-*/
-//-->
index e9aff9c..0c04f1f 100644 (file)
@@ -1,6 +1,3 @@
-<!--
-/*
--->
 <!doctype html>
 <title>creating a dummy shared worker</title>
 <link rel=help href="http://www.whatwg.org/html/#dom-sharedworker">
@@ -9,9 +6,6 @@
 <div id="log"></div>
 <script>
 test(function() {
-  var worker = new SharedWorker('#');
+  var worker = new SharedWorker('dummy-shared-worker.js');
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.js
new file mode 100644 (file)
index 0000000..e69de29
index 95ff6d1..c37f6b6 100644 (file)
@@ -1,6 +1,3 @@
-<!--
-/*
--->
 <!doctype html>
 <title>creating a dummy shared worker with explicit name ""</title>
 <link rel=help href="http://www.whatwg.org/html/#dom-sharedworker">
@@ -9,9 +6,6 @@
 <div id="log"></div>
 <script>
 test(function() {
-  var worker = new SharedWorker('#', '');
+  var worker = new SharedWorker('empty.js', '');
 });
 </script>
-<!--
-*/
-//-->
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/empty.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/empty.js
new file mode 100644 (file)
index 0000000..e69de29
index 1396dc7..6860e68 100644 (file)
@@ -1,15 +1,3 @@
-<!--
-var expected = 'self location close onerror importScripts navigator addEventListener removeEventListener dispatchEvent name onconnect setTimeout clearTimeout setInterval clearInterval'.split(' ');
-var log = '';
-for (var i = 0; i < expected.length; ++i) {
-  if (!(expected[i] in self))
-    log += expected[i] + ' did not exist\n';
-}
-onconnect = function(e) {
-  e.ports[0].postMessage(log);
-};
-/*
--->
 <!doctype html>
 <title>members of SharedWorkerGlobalScope</title>
 <script src="/resources/testharness.js"></script>
@@ -17,18 +5,11 @@ onconnect = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new SharedWorker('#');
+  var worker = new SharedWorker('global-members.js');
   worker.port.addEventListener('message', this.step_func(function(e) {
     assert_equals(e.data, '');
     this.done();
   }), false);
   worker.port.start();
 });
-</script>
-<!--
-*/
-//-->
-
-
-
-
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/global-members.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/global-members.js
new file mode 100644 (file)
index 0000000..4783447
--- /dev/null
@@ -0,0 +1,9 @@
+var expected = 'self location close onerror importScripts navigator addEventListener removeEventListener dispatchEvent name onconnect setTimeout clearTimeout setInterval clearInterval'.split(' ');
+var log = '';
+for (var i = 0; i < expected.length; ++i) {
+  if (!(expected[i] in self))
+    log += expected[i] + ' did not exist\n';
+}
+onconnect = function(e) {
+  e.ports[0].postMessage(log);
+};
\ No newline at end of file
index e91b2dc..01949dd 100644 (file)
@@ -1,19 +1,3 @@
-<!--
-var prt;
-function handleCall(e) {
-  var log = [];
-  for (var i = 0; i < e.data.length; ++i) {
-    if (!(e.data[i] in self))
-      log.push(e.data[i]);
-  }
-  prt.postMessage('These were missing: '+log.join(', '));
-}
-onconnect = function(e) {
-  prt = e.ports[0];
-  prt.onmessage = handleCall;
-};
-/*
--->
 <!doctype html>
 <title>expected interface objects/constructors</title>
 <script src="/resources/testharness.js"></script>
@@ -27,7 +11,7 @@ onconnect = function(e) {
   if (expected[i] in window)
      supported.push(expected[i]);
   }
-  var worker = new SharedWorker('#');
+  var worker = new SharedWorker('interface-objects.js');
   worker.port.start();
   worker.port.postMessage(supported);
   worker.port.addEventListener('message', this.step_func(function(e) {
@@ -35,7 +19,4 @@ onconnect = function(e) {
     this.done();
   }), false);
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/interface-objects.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/interface-objects.js
new file mode 100644 (file)
index 0000000..15de7c9
--- /dev/null
@@ -0,0 +1,13 @@
+var prt;
+function handleCall(e) {
+  var log = [];
+  for (var i = 0; i < e.data.length; ++i) {
+    if (!(e.data[i] in self))
+      log.push(e.data[i]);
+  }
+  prt.postMessage('These were missing: '+log.join(', '));
+}
+onconnect = function(e) {
+  prt = e.ports[0];
+  prt.onmessage = handleCall;
+};
\ No newline at end of file
index 823e16c..83b0072 100644 (file)
@@ -1,9 +1,3 @@
-<!--
-onconnect = function(e) {
-  e.ports[0].postMessage(self.name);
-}
-/*
--->
 <!doctype html>
 <title>self.name</title>
 <script src="/resources/testharness.js"></script>
@@ -11,7 +5,7 @@ onconnect = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new SharedWorker('#', 'hello');
+  var worker = new SharedWorker('name.js', 'hello');
   worker.port.addEventListener('message', this.step_func(function(e) {
     assert_equals(e.data, 'hello');
     this.done();
@@ -19,6 +13,3 @@ onconnect = function(e) {
   worker.port.start();
 });
 </script>
-<!--
-*/
-//-->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/name.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/name.js
new file mode 100644 (file)
index 0000000..88b2684
--- /dev/null
@@ -0,0 +1,3 @@
+onconnect = function(e) {
+  e.ports[0].postMessage(self.name);
+}
index a2f4df0..12784e9 100644 (file)
@@ -1,9 +1,3 @@
-<!--
-onconnect = function(e) {
-  e.ports[0].postMessage(true);
-}
-/*
--->
 <!doctype html>
 <title>worker.port.onmessage</title>
 <script src="/resources/testharness.js"></script>
@@ -11,13 +5,10 @@ onconnect = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new SharedWorker('#', '');
+  var worker = new SharedWorker('port-onmessage.js', '');
   worker.port.onmessage = this.step_func(function(e) {
     assert_true(e.data);
     this.done();
   });
 });
 </script>
-<!--
-*/
-//-->
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-onmessage.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-onmessage.js
new file mode 100644 (file)
index 0000000..83d4579
--- /dev/null
@@ -0,0 +1,3 @@
+onconnect = function(e) {
+  e.ports[0].postMessage(true);
+}
index f8a676d..8f6f58a 100644 (file)
@@ -1,6 +1,3 @@
-<!--
-/*
--->
 <!doctype html>
 <title>worker.port</title>
 <link rel=help href="http://www.whatwg.org/html/#sharedworker">
@@ -10,7 +7,7 @@
 <div id="log"></div>
 <script>
 test(function() {
-  var worker = new SharedWorker('#', '');
+  var worker = new SharedWorker('empty.js', '');
   assert_true('port' in worker, "port");
   assert_true('postMessage' in worker.port, "postMessage");
   assert_true('start' in worker.port, "start");
@@ -21,6 +18,3 @@ test(function() {
   assert_true('dispatchEvent' in worker.port, "dispatchEvent");
 });
 </script>
-<!--
-*/
-//-->
index f087ab0..181b311 100644 (file)
@@ -1,6 +1,3 @@
-<!--
-/*
--->
 <!doctype html>
 <title>setting worker.port</title>
 <link rel=help href="http://www.whatwg.org/html/#sharedworker">
@@ -10,12 +7,9 @@
 <div id="log"></div>
 <script>
 test(function() {
-  var worker = new SharedWorker('#', '');
+  var worker = new SharedWorker('empty.js', '');
   var x = worker.port;
   worker.port = 1;
   assert_equals(worker.port, x);
 });
 </script>
-<!--
-*/
-//-->
index 78d5316..66747b2 100644 (file)
@@ -3,7 +3,8 @@
 -->
 <!doctype html>
 <title>same-origin checks</title>
-<link rel=help href="http://www.whatwg.org/html/#dom-sharedworker">
+<meta name="timeout" content="long">
+<link rel=help href="https://html.spec.whatwg.org/multipage/workers.html#dom-sharedworker">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
@@ -19,7 +20,8 @@ function testSharedWorkerHelper(t, script) {
       assert_true(e instanceof Event);
     });
   } catch (e) {
-    t.step_func_done(function(e) { assert_true(true); });
+    assert_throws("SecurityError", () => {throw e}, "DOMExceptions thrown on cross-origin SharedWorker construction must be SecurityErrors");
+    t.done();
   }
 }
 
index 3973902..77a4f63 100644 (file)
@@ -1,15 +1,3 @@
-<!--
-var unexpected = 'open print stop getComputedStyle getSelection releaseEvents captureEvents alert confirm prompt addEventStream removeEventStream back forward attachEvent detachEvent navigate DOMParser XMLSerializer XPathEvaluator XSLTProcessor opera Image Option frames Audio SVGUnitTypes SVGZoomAndPan java netscape sun Packages ByteArray closed defaultStatus document event frameElement history innerHeight innerWidth opener outerHeight outerWidth pageXOffset pageYOffset parent screen screenLeft screenTop screenX screenY status top window length'.split(' '); // iterated window in opera and removed expected ones
-var log = '';
-for (var i = 0; i < unexpected.length; ++i) {
-  if (unexpected[i] in self)
-    log += unexpected[i] + ' ';
-}
-onconnect = function(e) {
-  e.ports[0].postMessage(log);
-};
-/*
--->
 <!doctype html>
 <title>unexpected members/interface objects/constructors</title>
 <script src="/resources/testharness.js"></script>
@@ -17,14 +5,11 @@ onconnect = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new SharedWorker('#');
+  var worker = new SharedWorker('unexpected-global-properties.js');
   worker.port.addEventListener('message', this.step_func(function(e) {
     assert_equals(e.data, '');
     this.done();
   }), false);
   worker.port.start();
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.js
new file mode 100644 (file)
index 0000000..d2cd94b
--- /dev/null
@@ -0,0 +1,9 @@
+var unexpected = 'open print stop getComputedStyle getSelection releaseEvents captureEvents alert confirm prompt addEventStream removeEventStream back forward attachEvent detachEvent navigate DOMParser XMLSerializer XPathEvaluator XSLTProcessor opera Image Option frames Audio SVGUnitTypes SVGZoomAndPan java netscape sun Packages ByteArray closed defaultStatus document event frameElement history innerHeight innerWidth opener outerHeight outerWidth pageXOffset pageYOffset parent screen screenLeft screenTop screenX screenY status top window length'.split(' '); // iterated window in opera and removed expected ones
+var log = '';
+for (var i = 0; i < unexpected.length; ++i) {
+  if (unexpected[i] in self)
+    log += unexpected[i] + ' ';
+}
+onconnect = function(e) {
+  e.ports[0].postMessage(log);
+};
\ No newline at end of file
index 9358a21..c00f00b 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -17,17 +17,24 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/1
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/URLMismatchError.htm
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/connect-event.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/connect-event.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-name.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/dummy-shared-worker.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/empty-name.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/empty.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/global-members.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/global-members.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/interface-objects.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/interface-objects.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/name.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/name.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/no-arguments-ctor.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/null
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/null-arguments.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/number-arguments.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-onmessage.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-onmessage.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-properties.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/port-readonly.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/same-origin.html
@@ -36,4 +43,5 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/undefined
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/undefined-arguments.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unexpected-global-properties.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/SharedWorker/unresolvable-url.html
index c40424d..b27f278 100644 (file)
@@ -1,11 +1,3 @@
-<!--
-for (;) // should cause onerror to be invoked, but onerror is null, so
-        // the error is "not handled". should fire an ErrorEvent on the
-        // worker.
-  break;
-postMessage(1); // shouldn't do anything since the script doesn't compile
-/*
--->
 <!doctype html>
 <title>AbstractWorker.onerror</title>
 <link rel=help href="https://html.spec.whatwg.org/multipage/#runtime-script-errors-2">
@@ -17,14 +9,14 @@ postMessage(1); // shouldn't do anything since the script doesn't compile
 <script>
 setup({allow_uncaught_exception:true});
 async_test(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('AbstractWorker.onerror.js');
   var error;
   worker.onerror = this.step_func(function(a, b, c) {
     error = a;
     assert_equals('' + a, '[object ErrorEvent]');
     assert_true("message" in a, 'ErrorEvent.message');
     assert_equals(typeof a.message, "string", 'ErrorEvent.message');
-    assert_equals(a.filename, document.URL + '#', 'ErrorEvent.filename');
+    assert_equals(a.filename, document.URL.replace('.html', '.js'), 'ErrorEvent.filename');
     assert_true("lineno" in a, 'ErrorEvent.lineno');
     assert_equals(typeof a.lineno, "number", 'ErrorEvent.lineno');
     assert_equals(b, undefined, 'unexpected second argument to onerror');
@@ -42,7 +34,4 @@ async_test(function() {
     assert_equals(f, undefined, 'unexpected sixth argument to onerror');
   });
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.js
new file mode 100644 (file)
index 0000000..e0bc507
--- /dev/null
@@ -0,0 +1,5 @@
+for (;) // should cause onerror to be invoked, but onerror is null, so
+        // the error is "not handled". should fire an ErrorEvent on the
+        // worker.
+  break;
+postMessage(1); // shouldn't do anything since the script doesn't compile
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor-expected.txt
new file mode 100644 (file)
index 0000000..508e4b7
--- /dev/null
@@ -0,0 +1,9 @@
+
+PASS Test toString propagation exception. 
+PASS Test recursive Worker creation. 
+PASS Test worker creation with no arguments 
+FAIL Test Worker creation with empty script URL. The string did not match the expected pattern.
+PASS Test invalid script URL. 
+PASS Test not existent script URL. 
+PASS Test the Worker object defines postMessage() and addEventListener(). 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor.html b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor.html
new file mode 100644 (file)
index 0000000..e073df7
--- /dev/null
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<title>Test Worker constructor functionality.</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+
+test(() => {
+  assert_throws(new Error(),
+                function() {
+                    new Worker({toString:function(){throw new Error()}})},
+                'toString exception should be propagated');
+}, 'Test toString propagation exception.');
+
+test(() => {
+  try {
+    var foo = {toString:function(){new Worker(foo)}};
+    new Worker(foo);
+  } catch(ex) {
+    assert_true(true, 'trying to create workers recursively should result in an: ' +
+                ex + 'exception.')
+  }
+}, 'Test recursive Worker creation.');
+
+test(() => {
+  assert_throws(new TypeError(),
+                function() { new Worker(); },
+                'invoking Worker constructor without arguments should result' +
+                'in an exception.')
+}, 'Test worker creation with no arguments');
+
+async_test(t => {
+  var worker = new Worker('');
+  worker.onerror = function(e) {
+    e.preventDefault();
+    t.done();
+  }
+}, 'Test Worker creation with empty script URL.');
+
+test(() => {
+  assert_throws(new SyntaxError(),
+                function() { var worker = new Worker('http://invalid:123$'); },
+                'Invoking Worker constructor with invalid script URL should' +
+                'result in an exception.');
+}, 'Test invalid script URL.');
+
+async_test(t => {
+  var worker = new Worker('does-not-exist.js');
+  worker.onerror = function(e) {
+    t.done();
+  }
+}, 'Test not existent script URL.');
+
+test(() => {
+  var worker = new Worker('../../support/Worker-common.js');
+  assert_true('postMessage' in worker,
+              'worker.postMessage did not exist.');
+  assert_true('addEventListener' in worker,
+              'worker.addEventListener did not exist.');
+}, 'Test the Worker object defines postMessage() and addEventListener().');
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor-expected.txt
deleted file mode 100644 (file)
index c6e36cf..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-PASS without arguments 
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor.html b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor.html
deleted file mode 100644 (file)
index 770c7cc..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>without arguments</title>
-<link rel=help href="http://dev.w3.org/2006/webapi/WebIDL/#es-interface-call">
-<link rel=help href="http://www.whatwg.org/html/#dedicated-workers-and-the-worker-interface">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
-  assert_throws(new TypeError(), function() { new Worker(); });
-});
-</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string-expected.txt
deleted file mode 100644 (file)
index 3662e30..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-FAIL resolve the empty string The string did not match the expected pattern.
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string.html b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string.html
deleted file mode 100644 (file)
index 0426223..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-<!--
-postMessage('ok');
-/*
--->
-<!doctype html>
-<meta charset=utf-8>
-<title>resolve the empty string</title>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-var t = async_test();
-t.step(function() {
-  var worker = new Worker('');
-  worker.addEventListener('message', t.step_func_done(function(e) {
-    assert_equals(e.data, 'ok');
-  }), false);
-});
-</script>
-<!--
-*/
-//-->
index bbc4382..6df5e92 100644 (file)
@@ -1,7 +1,8 @@
 <!doctype html>
 <meta charset=utf-8>
 <title>same-origin checks; the script is in a script element</title>
-<link rel=help href="http://www.whatwg.org/html/#dom-worker">
+<meta name="timeout" content="long">
+<link rel=help href="https://html.spec.whatwg.org/multipage/workers.html#dom-worker">
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <div id="log"></div>
 // not propogate to the window before the tests finish
 setup({allow_uncaught_exception: true});
 
-function testSharedWorkerHelper(t, script) {
+function testWorkerHelper(t, script) {
   try {
-    var worker = new SharedWorker(script, '');
+    var worker = new Worker(script);
     worker.onerror = t.step_func_done(function(e) {
       assert_true(e instanceof Event);
     });
   } catch (e) {
-    t.step_func_done(function(e) { assert_true(true); });
+    assert_throws("SecurityError", () => {throw e}, "DOMExceptions thrown on cross-origin Worker construction must be SecurityErrors");
+    t.done();
   }
 }
 
@@ -33,31 +35,31 @@ async_test(function() {
 }, "data_url");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t, 'about:blank');
+  testWorkerHelper(t, 'about:blank');
 }, "about_blank");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t, 'http://www.example.invalid/');
+  testWorkerHelper(t, 'http://www.example.invalid/');
 }, "example_invalid");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t, location.protocol+'//'+location.hostname+':81/');
+  testWorkerHelper(t, location.protocol+'//'+location.hostname+':81/');
 }, "port_81");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t, 'https://'+location.hostname+':80/');
+  testWorkerHelper(t, 'https://'+location.hostname+':80/');
 }, "https_port_80");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t, 'https://'+location.hostname+':8000/');
+  testWorkerHelper(t, 'https://'+location.hostname+':8000/');
 }, "https_port_8000");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t, 'http://'+location.hostname+':8012/');
+  testWorkerHelper(t, 'http://'+location.hostname+':8012/');
 }, "http_post_8012");
 
 async_test(function(t) {
-  testSharedWorkerHelper(t,'javascript:""');
+  testWorkerHelper(t,'javascript:""');
 }, "javascript_url");
 
 </script>
index 3ae8521..6edf359 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
index 52f9707..b9af76e 100644 (file)
@@ -1,10 +1,3 @@
-<!--
-(function f() {
-  postMessage(1);
-  setTimeout(f, 0);
-})();
-/*
--->
 <!doctype html>
 <title>terminate()</title>
 <link rel=help href="http://www.whatwg.org/html/#dom-worker-terminate">
@@ -14,7 +7,7 @@
 <script>
 var t = async_test();
 t.step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('terminate.js');
   var i = 0;
   var expected;
 
@@ -38,7 +31,4 @@ t.step(function() {
 
   }), 100);
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/terminate.js b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/terminate.js
new file mode 100644 (file)
index 0000000..e6349c3
--- /dev/null
@@ -0,0 +1,4 @@
+(function f() {
+  postMessage(1);
+  setTimeout(f, 0);
+})();
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url-expected.txt
deleted file mode 100644 (file)
index b63d2f3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-
-PASS unresolvable url 
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url.html b/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url.html
deleted file mode 100644 (file)
index 8c04b00..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<!doctype html>
-<meta charset=utf-8>
-<title>unresolvable url</title>
-<link rel=help href="http://www.whatwg.org/html/#dom-worker">
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<div id="log"></div>
-<script>
-test(function() {
-  assert_throws("SyntaxError", function() { new Worker('http://invalid url/'); });
-});
-</script>
index a7fdb33..281e7ae 100644 (file)
@@ -1,7 +1,7 @@
 The tests in this directory were imported from the W3C repository.
 Do NOT modify these tests directly in WebKit.
 Instead, create a pull request on the WPT github:
-       https://github.com/w3c/web-platform-tests
+       https://github.com/web-platform-tests/wpt
 
 Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
 
@@ -16,18 +16,18 @@ None
 List of files:
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/1
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/AbstractWorker.onerror.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Blob-url.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/DedicatedWorkerGlobalScope-members.worker.js
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/Worker-constructor.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/ctor-1.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/ctor-null.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/ctor-undefined.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/expected-self-properties.worker.js
-/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/no-arguments-ctor.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/null
-/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/resolve-empty-string.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/same-origin.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/terminate.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/terminate.js
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/undefined
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unexpected-self-properties.worker.js
-/LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/unresolvable-url.html
 /LayoutTests/imported/w3c/web-platform-tests/workers/constructors/Worker/use-base-url.html
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window-expected.txt
new file mode 100644 (file)
index 0000000..f3f4770
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS Creating a dedicated worker from a blob URL works. 
+PASS Creating a dedicated worker from a blob URL works immediately before revoking. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window.html b/LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window.js b/LayoutTests/imported/w3c/web-platform-tests/workers/dedicated-worker-from-blob-url.window.js
new file mode 100644 (file)
index 0000000..f54faf5
--- /dev/null
@@ -0,0 +1,28 @@
+function message_from_port(port) {
+  return new Promise(resolve => {
+    port.onmessage = e => resolve(e.data);
+  });
+}
+
+promise_test(async t => {
+  const run_result = 'worker_OK';
+  const blob_contents = 'self.postMessage("' + run_result + '");';
+  const blob = new Blob([blob_contents]);
+  const url = URL.createObjectURL(blob);
+
+  const worker = new Worker(url);
+  const reply = await message_from_port(worker);
+  assert_equals(reply, run_result);
+}, 'Creating a dedicated worker from a blob URL works.');
+
+promise_test(async t => {
+  const run_result = 'worker_OK';
+  const blob_contents = 'self.postMessage("' + run_result + '");';
+  const blob = new Blob([blob_contents]);
+  const url = URL.createObjectURL(blob);
+
+  const worker = new Worker(url);
+  URL.revokeObjectURL(url);
+  const reply = await message_from_port(worker);
+  assert_equals(reply, run_result);
+}, 'Creating a dedicated worker from a blob URL works immediately before revoking.');
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker-expected.txt
new file mode 100644 (file)
index 0000000..47a849b
--- /dev/null
@@ -0,0 +1,3 @@
+
+PASS Test that should pass 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.html
new file mode 100644 (file)
index 0000000..5ac765c
--- /dev/null
@@ -0,0 +1,21 @@
+<!doctype html>
+<!--
+  This file is an example of a hand-written test using
+  fetch_tests_from_worker().
+  Unlike *.any.js or *.worker.js tests, fetch_tests_from_worker.html/js files
+  are manually written and no generated glue code are involved.
+-->
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+fetch_tests_from_worker(new Worker("fetch_tests_from_worker.js"));
+
+// If you want to test on SharedWorker,
+// fetch_tests_from_worker(new SharedWorker("fetch_tests_from_worker.js"));
+
+// See ServiceWorkersHandler in
+// https://github.com/web-platform-tests/wpt/blob/master/tools/serve/serve.py
+// for the generated snippet used in .any.js for service workers.
+// Note: when testing service workers, also add ".https." file flag in the
+// main HTML's file name to run the test on HTTPS.
+</script>
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.js
new file mode 100644 (file)
index 0000000..01ba12a
--- /dev/null
@@ -0,0 +1,28 @@
+// This file is an example of a hand-written test using
+// fetch_tests_from_worker().
+// Unlike *.any.js or *.worker.js tests, fetch_tests_from_worker.html/js files
+// are manually written and no generated glue code are involved.
+
+// fetch_tests_from_worker() requires testharness.js both on the parent
+// document and on the worker.
+importScripts("/resources/testharness.js");
+
+// ============================================================================
+
+// Test body.
+test(() => {
+    assert_equals(1, 1, "1 == 1");
+  },
+  "Test that should pass"
+);
+
+// ============================================================================
+
+// `done()` is always needed at the bottom for dedicated workers and shared
+// workers, even if you write `async_test()` or `promise_test()`.
+// `async_test()` and `promise_test()` called before this `done()`
+// will continue and assertions/failures after this `done()` are not ignored.
+// See
+// https://web-platform-tests.org/writing-tests/testharness-api.html#determining-when-all-tests-are-complete
+// for details.
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker-expected.txt
new file mode 100644 (file)
index 0000000..b374cea
--- /dev/null
@@ -0,0 +1,4 @@
+
+PASS Test that should pass 
+PASS Worker top-level script is the .worker.js file itself. 
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.html b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.html
new file mode 100644 (file)
index 0000000..2382913
--- /dev/null
@@ -0,0 +1 @@
+<!-- This file is required for WebKit test infrastructure to run the templated test -->
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.js
new file mode 100644 (file)
index 0000000..aeca236
--- /dev/null
@@ -0,0 +1,35 @@
+// This file is an example of a test using *.worker.js mechanism.
+// The parent document that calls fetch_tests_from_worker() is auto-generated
+// but there are no generated code in the worker side.
+
+// fetch_tests_from_worker() requires testharness.js both on the parent
+// document and on the worker.
+importScripts("/resources/testharness.js");
+
+// ============================================================================
+
+// Test body.
+test(() => {
+    assert_equals(1, 1, "1 == 1");
+  },
+  "Test that should pass"
+);
+
+test(() => {
+    // This file is "general.worker.js" and this file itself is the worker
+    // top-level script (which is different from the .any.js case).
+    assert_equals(location.pathname, "/workers/examples/general.worker.js");
+  },
+  "Worker top-level script is the .worker.js file itself."
+);
+
+// ============================================================================
+
+// `done()` is always needed at the bottom for dedicated workers and shared
+// workers, even if you write `async_test()` or `promise_test()`.
+// `async_test()` and `promise_test()` called before this `done()`
+// will continue and assertions/failures after this `done()` are not ignored.
+// See
+// https://web-platform-tests.org/writing-tests/testharness-api.html#determining-when-all-tests-are-complete
+// for details.
+done();
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/examples/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/workers/examples/w3c-import.log
new file mode 100644 (file)
index 0000000..86fa2fe
--- /dev/null
@@ -0,0 +1,21 @@
+The tests in this directory were imported from the W3C repository.
+Do NOT modify these tests directly in WebKit.
+Instead, create a pull request on the WPT github:
+       https://github.com/web-platform-tests/wpt
+
+Then run the Tools/Scripts/import-w3c-tests in WebKit to reimport
+
+Do NOT modify or remove this file.
+
+------------------------------------------------------------------------
+Properties requiring vendor prefixes:
+None
+Property values requiring vendor prefixes:
+None
+------------------------------------------------------------------------
+List of files:
+/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.html
+/LayoutTests/imported/w3c/web-platform-tests/workers/examples/fetch_tests_from_worker.js
+/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.any.js
+/LayoutTests/imported/w3c/web-platform-tests/workers/examples/general.worker.js
+/LayoutTests/imported/w3c/web-platform-tests/workers/examples/onconnect.any.js
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker-expected.txt
deleted file mode 100644 (file)
index 1aaf8cf..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-CONSOLE MESSAGE: line 1774: TypeError: null is not an object (evaluating 'this.message_target.removeEventListener')
-CONSOLE MESSAGE: line 457: WebIDLParseError: Syntax error at line 82, since `interface WindowOrWorkerGlobalScope`:
-WorkerGlobalScope implements WindowOrWorkerGlobalScope;
-^ Unrecognised tokens
-
-FAIL Untitled WebIDLParseError: Syntax error at line 82, since `interface WindowOrWorkerGlobalScope`:
-WorkerGlobalScope implements WindowOrWorkerGlobalScope;
-^ Unrecognised tokens
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces.worker.js
deleted file mode 100644 (file)
index fc9f360..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-"use strict";
-
-importScripts("/resources/testharness.js");
-importScripts("/resources/WebIDLParser.js", "/resources/idlharness.js");
-
-var request = new XMLHttpRequest();
-request.onload = function() {
-  var idlArray = new IdlArray();
-  var idls = request.responseText;
-  idlArray.add_idls(idls);
-  idlArray.add_objects({
-    DedicatedWorkerGlobalScope: ['self'],
-    WorkerNavigator: ['self.navigator'],
-    WorkerLocation: ['self.location'],
-  });
-  idlArray.test();
-  done();
-};
-request.open("GET", "/interfaces/dedicated-workers.idl");
-request.send();
index 7ae4b07..be89478 100644 (file)
@@ -1,9 +1,3 @@
-<!--
-onmessage = function(e) {
-  postMessage(e.ports instanceof Array && e.ports.length === 0);
-}
-/*
--->
 <!doctype html>
 <title>e.ports in dedicated worker</title>
 <script src="/resources/testharness.js"></script>
@@ -11,15 +5,11 @@ onmessage = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('event-ports-dedicated.js');
   worker.postMessage(1);
   worker.onmessage = this.step_func(function(e) {
     assert_true(e.data);
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
-
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/event-ports-dedicated.js
new file mode 100644 (file)
index 0000000..c5cc9f8
--- /dev/null
@@ -0,0 +1,3 @@
+onmessage = function(e) {
+  postMessage(e.ports instanceof Array && e.ports.length === 0);
+}
\ No newline at end of file
index 2041301..7c019a9 100644 (file)
@@ -1,17 +1,3 @@
-<!--
-onmessage = function(e) {
-  function processPixels(imagedata) {
-    var pixeldata = imagedata.data;
-    for (var i = 0; i < pixeldata.length; i = i+4) {
-      pixeldata[i] = 128;
-    }
-    postMessage(imagedata);
-  }
-  processPixels(e.data[0]);
-}
-
-/*
--->
 <!doctype html>
 <title>posting an imagedata (from a cloned canvas) in an array</title>
 <script src="/resources/testharness.js"></script>
@@ -19,7 +5,7 @@ onmessage = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('imagedata-cloned-canvas-in-array.js');
   var canvas = document.createElement('canvas');
   var clone = canvas.cloneNode(true);
   var ctx = clone.getContext('2d');
@@ -33,7 +19,4 @@ onmessage = function(e) {
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
\ No newline at end of file
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/imagedata-cloned-canvas-in-array.js
new file mode 100644 (file)
index 0000000..76eaee3
--- /dev/null
@@ -0,0 +1,10 @@
+onmessage = function(e) {
+  function processPixels(imagedata) {
+    var pixeldata = imagedata.data;
+    for (var i = 0; i < pixeldata.length; i = i+4) {
+      pixeldata[i] = 128;
+    }
+    postMessage(imagedata);
+  }
+  processPixels(e.data[0]);
+}
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary-expected.txt
new file mode 100644 (file)
index 0000000..29a1e93
--- /dev/null
@@ -0,0 +1,3 @@
+
+FAIL Using dictionary as postMessage's second argument Type error
+
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.html
new file mode 100644 (file)
index 0000000..1749644
--- /dev/null
@@ -0,0 +1,16 @@
+<!doctype html>
+<title>Using dictionary as postMessage's second argument</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<div id="log"></div>
+<script>
+(async_test()).step(function() {
+  var worker = new Worker('second-argument-dictionary.js');
+  var ab = new ArrayBuffer(1);
+  worker.postMessage(ab, {transfer: [ab]});
+  worker.onmessage = this.step_func(function(e) {
+    assert_equals(e.data.byteLength, 1);
+    this.done();
+  });
+});
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-dictionary.js
new file mode 100644 (file)
index 0000000..0cb80f8
--- /dev/null
@@ -0,0 +1,7 @@
+onmessage = (event) => {
+  try {
+    postMessage(event.data, {transfer: [event.data]});
+  } catch(e) {
+    postMessage(''+e);
+  }
+}
\ No newline at end of file
index df4c9f8..8db06b4 100644 (file)
@@ -1,11 +1,3 @@
-<!--
-try {
-  postMessage(false, [null]);
-} catch(e) {
-  postMessage(e instanceof TypeError);
-}
-/*
--->
 <!doctype html>
 <title>Using [null] in postMessage's second argument</title>
 <script src="/resources/testharness.js"></script>
@@ -13,14 +5,10 @@ try {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('second-argument-null-in-array.js');
   worker.onmessage = this.step_func(function(e) {
     assert_true(e.data);
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
-
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null-in-array.js
new file mode 100644 (file)
index 0000000..95a0942
--- /dev/null
@@ -0,0 +1,5 @@
+try {
+  postMessage(false, [null]);
+} catch(e) {
+  postMessage(e instanceof TypeError);
+}
\ No newline at end of file
index e81a56b..68d9caa 100644 (file)
@@ -1,11 +1,3 @@
-<!--
-try {
-  postMessage(1, null);
-} catch(e) {
-  postMessage(e instanceof TypeError);
-}
-/*
--->
 <!doctype html>
 <title>Using null in postMessage's second argument</title>
 <script src="/resources/testharness.js"></script>
@@ -13,13 +5,10 @@ try {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('second-argument-null.js');
   worker.onmessage = this.step_func(function(e) {
-    assert_true(e.data);
+    assert_equals(1, e.data);
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-null.js
new file mode 100644 (file)
index 0000000..6f6f9e7
--- /dev/null
@@ -0,0 +1,5 @@
+try {
+  postMessage(1, null);
+} catch(e) {
+  postMessage(e instanceof TypeError);
+}
\ No newline at end of file
index 7d01eba..c7dcb3c 100644 (file)
@@ -1,11 +1,3 @@
-<!--
-try {
-  postMessage(1, undefined);
-} catch(e) {
-  postMessage(''+e);
-}
-/*
--->
 <!doctype html>
 <title>Using undefined in postMessage's second argument</title>
 <script src="/resources/testharness.js"></script>
@@ -13,13 +5,10 @@ try {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('second-argument-undefined.js');
   worker.onmessage = this.step_func(function(e) {
     assert_equals(e.data, 1);
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/second-argument-undefined.js
new file mode 100644 (file)
index 0000000..6f11443
--- /dev/null
@@ -0,0 +1,5 @@
+try {
+  postMessage(1, undefined);
+} catch(e) {
+  postMessage(''+e);
+}
\ No newline at end of file
index d1a3f0f..5b3e014 100644 (file)
@@ -1,10 +1,3 @@
-<!--
-var x = postMessage;
-postMessage = 1;
-x(postMessage == 1);
-
-/*
--->
 <!doctype html>
 <title>setting postMessage</title>
 <script src="/resources/testharness.js"></script>
@@ -12,13 +5,10 @@ x(postMessage == 1);
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('setting-postMessage.js');
   worker.onmessage = this.step_func(function(e) {
     assert_true(e.data);
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/setting-postMessage.js
new file mode 100644 (file)
index 0000000..5426ebd
--- /dev/null
@@ -0,0 +1,3 @@
+var x = postMessage;
+postMessage = 1;
+x(postMessage == 1);
\ No newline at end of file
index c0ded6a..c7fbb0f 100644 (file)
@@ -1,12 +1,3 @@
-<!--
-onmessage = function(e) {
-  var imagedata = e.data;
-  imagedata.data[0] = 128;
-  postMessage(imagedata);
-}
-
-/*
--->
 <!doctype html>
 <title>structured clone of ImageData</title>
 <script src="/resources/testharness.js"></script>
@@ -14,7 +5,7 @@ onmessage = function(e) {
 <div id="log"></div>
 <script>
 (async_test()).step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('structured-clone-imagedata.js');
   var ctx = document.createElement('canvas').getContext('2d');
   var imagedata = ctx.getImageData(0, 0, 300, 150);
   worker.postMessage(imagedata);
@@ -24,7 +15,4 @@ onmessage = function(e) {
     this.done();
   });
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-imagedata.js
new file mode 100644 (file)
index 0000000..04cd7ee
--- /dev/null
@@ -0,0 +1,5 @@
+onmessage = function(e) {
+  var imagedata = e.data;
+  imagedata.data[0] = 128;
+  postMessage(imagedata);
+}
\ No newline at end of file
index ba35742..edf4fb7 100644 (file)
@@ -1,20 +1,3 @@
-<!--
-var err = new Error('foo');
-var date = new Date();
-// commented out bits are either tested elsewhere or not supported yet. or uncloneable.
-var tests = [undefined, null, false, true, 1, NaN, Infinity, 'foo', date, /foo/, /* ImageData, File, FileData, FileList,*/ null/*self*/,
-              [undefined, null, false, true, 1, NaN, Infinity, 'foo', /*date, /foo/,*/ null/*self*/, /*[], {},*/ null/*err*/],
-              {a:undefined, b:null, c:false, d:true, e:1, f:NaN, g:Infinity, h:'foo', /*i:date, j:/foo/,*/ k:null/*self*/, /*l:[], m:{},*/ n:null/*err*/},
-            null/*err*/];
-for (var i = 0; i < tests.length; ++i) {
-  try {
-    postMessage(tests[i]);
-  } catch(e) {
-    postMessage(''+e);
-  }
-}
-/*
--->
 <!doctype html>
 <title>structured clone of message</title>
 <script src="/resources/testharness.js"></script>
@@ -45,14 +28,11 @@ setTimeout(tests[tests.length-1].test.step_func(function() {
 }), 500);
 
 wrapper_test.step(function() {
-  var worker = new Worker('#');
+  var worker = new Worker('structured-clone-message.js');
   var i = 0;
   worker.onmessage = function(e) {
     tests[i].test.step(function() { tests[i].check(e); this.done(); });
     i++;
   };
 });
-</script>
-<!--
-*/
-//-->
+</script>
\ No newline at end of file
diff --git a/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.js b/LayoutTests/imported/w3c/web-platform-tests/workers/interfaces/DedicatedWorkerGlobalScope/postMessage/structured-clone-message.js
new file mode 100644 (file)
index 0000000..db456e1
--- /dev/null
@@ -0,0 +1,14 @@
+var err = new Error('foo');
+var date = new Date();
+// commented out bits are either tested elsewhere or not supported yet. or uncloneable.
+var tests = [undefined, null, false, true, 1, NaN, Infinity, 'foo', date, /foo/, /* ImageData, File, FileData, FileList,*/ null/*self*/,
+              [undefined, null, false, true, 1, NaN, Infinity, 'foo', /*date, /foo/,*/ null/*self*/, /*[], {},*/ null/*err*/],
+              {a:undefined, b:null, c:false, d:true, e:1, f:NaN, g:Infinity, h:'foo', /*i:date, j:/foo/,*/ k:null/*self*/, /*l:[], m:{},*/ n:null/*err*/},
+            null/*err*/];
+for (var i = 0; i < tests.length; ++i) {
+  try {
+    postMessage(tests[i]);
+  } catch(e) {
+    postMessage(''+e);
+  }
+}
\ No newline at end of file