WebKit Bugzilla
Attachment 343588 Details for
Bug 187001
: Import WPT tests for webmessaging
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
0001-Import-WPT-tests-for-webmessaging.patch (text/plain), 240.51 KB, created by
Frédéric Wang (:fredw)
on 2018-06-25 23:42:03 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Frédéric Wang (:fredw)
Created:
2018-06-25 23:42:03 PDT
Size:
240.51 KB
patch
obsolete
>From 3289df102a344d06c9c3fb511aca3612900c87ac Mon Sep 17 00:00:00 2001 >From: Frederic Wang <fwang@igalia.com> >Date: Mon, 25 Jun 2018 16:53:49 +0200 >Subject: [PATCH xserver] Import WPT tests for webmessaging > >--- > LayoutTests/ChangeLog | 11 + > LayoutTests/TestExpectations | 26 +++ > LayoutTests/imported/w3c/ChangeLog | 202 ++++++++++++++++++ > .../w3c/resources/import-expectations.json | 1 + > .../w3c/resources/resource-files.json | 4 + > .../Channel_postMessage_Blob-expected.txt | 3 + > .../webmessaging/Channel_postMessage_Blob.htm | 45 ++++ > ...nnel_postMessage_DataCloneErr-expected.txt | 3 + > .../Channel_postMessage_DataCloneErr.htm | 26 +++ > ...hannel_postMessage_clone_port-expected.txt | 4 + > .../Channel_postMessage_clone_port.htm | 42 ++++ > ..._postMessage_clone_port_error-expected.txt | 3 + > .../Channel_postMessage_clone_port_error.htm | 26 +++ > ..._postMessage_event_properties-expected.txt | 3 + > .../Channel_postMessage_event_properties.htm | 36 ++++ > ...tMessage_ports_readonly_array-expected.txt | 3 + > ...annel_postMessage_ports_readonly_array.htm | 39 ++++ > ...nel_postMessage_target_source-expected.txt | 3 + > .../Channel_postMessage_target_source.htm | 35 +++ > .../web-platform-tests/webmessaging/META.yml | 6 + > .../webmessaging/MessageEvent-expected.txt | 11 + > .../MessageEvent-trusted-expected.txt | 5 + > .../MessageEvent-trusted-worker.js | 4 + > .../webmessaging/MessageEvent-trusted.html | 45 ++++ > .../webmessaging/MessageEvent.html | 28 +++ > ...t_onmessage_postMessage_infinite_loop.html | 31 +++ > .../webmessaging/MessageEvent_properties.htm | 32 +++ > .../MessagePort_initial_disabled-expected.txt | 3 + > .../MessagePort_initial_disabled.htm | 13 ++ > .../MessagePort_onmessage_start-expected.txt | 3 + > .../MessagePort_onmessage_start.htm | 13 ++ > .../web-platform-tests/webmessaging/README.md | 2 + > .../Transferred_objects_unusable.sub.htm | 60 ++++++ > .../broadcastchannel/basics-expected.txt | 7 + > .../webmessaging/broadcastchannel/basics.html | 120 +++++++++++ > .../broadcastchannel/blobs-expected.txt | 4 + > .../webmessaging/broadcastchannel/blobs.html | 83 +++++++ > .../broadcastchannel/interface-expected.txt | 15 ++ > .../broadcastchannel/interface.html | 73 +++++++ > .../broadcastchannel/origin.window.js | 10 + > .../broadcastchannel/resources/origin.html | 8 + > .../broadcastchannel/resources/sandboxed.html | 10 + > .../broadcastchannel/resources/w3c-import.log | 19 ++ > .../broadcastchannel/resources/worker.js | 31 +++ > .../broadcastchannel/sandbox-expected.txt | 4 + > .../broadcastchannel/sandbox.html | 16 ++ > .../broadcastchannel/w3c-import.log | 22 ++ > .../broadcastchannel/workers.html | 141 ++++++++++++ > .../webmessaging/event.data.sub.htm | 58 +++++ > .../webmessaging/event.origin.sub.htm | 66 ++++++ > .../webmessaging/event.ports.sub.htm | 49 +++++ > .../webmessaging/event.source.htm | 51 +++++ > .../webmessaging/event.source.xorigin.sub.htm | 51 +++++ > .../message-channels/001-expected.txt | 3 + > .../webmessaging/message-channels/001.html | 17 ++ > .../message-channels/002-expected.txt | 3 + > .../webmessaging/message-channels/002.html | 14 ++ > .../message-channels/003-expected.txt | 3 + > .../webmessaging/message-channels/003.html | 19 ++ > .../webmessaging/message-channels/004-1.html | 8 + > .../webmessaging/message-channels/004-2.html | 10 + > .../message-channels/004-expected.txt | 4 + > .../webmessaging/message-channels/004.html | 22 ++ > .../message-channels/close-expected.txt | 8 + > .../webmessaging/message-channels/close.html | 68 ++++++ > .../message-channels/w3c-import.log | 24 +++ > .../message-channels/worker-expected.txt | 3 + > .../webmessaging/message-channels/worker.html | 26 +++ > .../webmessaging/messageerror-expected.txt | 5 + > .../webmessaging/messageerror.html | 44 ++++ > .../postMessage_ArrayBuffer.sub.htm | 44 ++++ > .../webmessaging/postMessage_Date.sub.htm | 40 ++++ > .../postMessage_Document-expected.txt | 3 + > .../webmessaging/postMessage_Document.htm | 36 ++++ > .../postMessage_Function-expected.txt | 3 + > .../webmessaging/postMessage_Function.htm | 36 ++++ > .../postMessage_MessagePorts_sorigin.htm | 76 +++++++ > .../postMessage_MessagePorts_xorigin.sub.htm | 76 +++++++ > .../webmessaging/postMessage_arrays.sub.htm | 39 ++++ > .../postMessage_asterisk_xorigin.sub.htm | 66 ++++++ > ...tMessage_dup_transfer_objects-expected.txt | 3 + > .../postMessage_dup_transfer_objects.htm | 38 ++++ > ...tMessage_invalid_targetOrigin-expected.txt | 3 + > .../postMessage_invalid_targetOrigin.htm | 38 ++++ > .../webmessaging/postMessage_objects.sub.htm | 40 ++++ > .../postMessage_origin_mismatch.sub.htm | 51 +++++ > ...ostMessage_origin_mismatch_xorigin.sub.htm | 51 +++++ > .../postMessage_solidus_sorigin.htm | 43 ++++ > .../postMessage_solidus_xorigin.sub.htm | 48 +++++ > .../webmessaging/w3c-import.log | 54 +++++ > .../webmessaging/with-ports/001-expected.txt | 3 + > .../webmessaging/with-ports/001.html | 12 ++ > .../webmessaging/with-ports/002-expected.txt | 3 + > .../webmessaging/with-ports/002.html | 14 ++ > .../webmessaging/with-ports/003-expected.txt | 3 + > .../webmessaging/with-ports/003.html | 12 ++ > .../webmessaging/with-ports/004-expected.txt | 3 + > .../webmessaging/with-ports/004.html | 14 ++ > .../webmessaging/with-ports/005-expected.txt | 3 + > .../webmessaging/with-ports/005.html | 14 ++ > .../webmessaging/with-ports/006-expected.txt | 3 + > .../webmessaging/with-ports/006.html | 14 ++ > .../webmessaging/with-ports/007-expected.txt | 3 + > .../webmessaging/with-ports/007.html | 14 ++ > .../webmessaging/with-ports/010-expected.txt | 17 ++ > .../webmessaging/with-ports/010.html | 113 ++++++++++ > .../webmessaging/with-ports/011-expected.txt | 3 + > .../webmessaging/with-ports/011.html | 29 +++ > .../webmessaging/with-ports/012-expected.txt | 3 + > .../webmessaging/with-ports/012.html | 16 ++ > .../webmessaging/with-ports/013-expected.txt | 3 + > .../webmessaging/with-ports/013.html | 17 ++ > .../webmessaging/with-ports/014-expected.txt | 3 + > .../webmessaging/with-ports/014.html | 17 ++ > .../webmessaging/with-ports/015-expected.txt | 5 + > .../webmessaging/with-ports/015.html | 15 ++ > .../webmessaging/with-ports/016-expected.txt | 4 + > .../webmessaging/with-ports/016.html | 23 ++ > .../webmessaging/with-ports/017-expected.txt | 4 + > .../webmessaging/with-ports/017.html | 18 ++ > .../webmessaging/with-ports/018-expected.txt | 4 + > .../webmessaging/with-ports/018.html | 18 ++ > .../webmessaging/with-ports/019-expected.txt | 4 + > .../webmessaging/with-ports/019.html | 20 ++ > .../webmessaging/with-ports/020.html | 30 +++ > .../webmessaging/with-ports/021.html | 30 +++ > .../webmessaging/with-ports/023-expected.txt | 3 + > .../webmessaging/with-ports/023.html | 11 + > .../webmessaging/with-ports/024-expected.txt | 3 + > .../webmessaging/with-ports/024.html | 15 ++ > .../webmessaging/with-ports/025-expected.txt | 3 + > .../webmessaging/with-ports/025.html | 13 ++ > .../webmessaging/with-ports/026-expected.txt | 3 + > .../webmessaging/with-ports/026.html | 13 ++ > .../webmessaging/with-ports/027-expected.txt | 4 + > .../webmessaging/with-ports/027.html | 26 +++ > .../webmessaging/with-ports/w3c-import.log | 40 ++++ > .../without-ports/001-expected.txt | 3 + > .../webmessaging/without-ports/001.html | 12 ++ > .../without-ports/002-expected.txt | 3 + > .../webmessaging/without-ports/002.html | 14 ++ > .../without-ports/003-expected.txt | 3 + > .../webmessaging/without-ports/003.html | 12 ++ > .../without-ports/004-expected.txt | 3 + > .../webmessaging/without-ports/004.html | 14 ++ > .../without-ports/005-expected.txt | 3 + > .../webmessaging/without-ports/005.html | 14 ++ > .../without-ports/006-expected.txt | 3 + > .../webmessaging/without-ports/006.html | 14 ++ > .../without-ports/007-expected.txt | 3 + > .../webmessaging/without-ports/007.html | 14 ++ > .../without-ports/008-expected.txt | 3 + > .../webmessaging/without-ports/008.html | 12 ++ > .../without-ports/009-expected.txt | 3 + > .../webmessaging/without-ports/009.html | 12 ++ > .../without-ports/010-expected.txt | 17 ++ > .../webmessaging/without-ports/010.html | 112 ++++++++++ > .../without-ports/011-expected.txt | 3 + > .../webmessaging/without-ports/011.html | 29 +++ > .../without-ports/012-expected.txt | 3 + > .../webmessaging/without-ports/012.html | 16 ++ > .../without-ports/013-expected.txt | 3 + > .../webmessaging/without-ports/013.html | 17 ++ > .../without-ports/014-expected.txt | 3 + > .../webmessaging/without-ports/014.html | 17 ++ > .../without-ports/015-expected.txt | 5 + > .../webmessaging/without-ports/015.html | 15 ++ > .../without-ports/016-expected.txt | 4 + > .../webmessaging/without-ports/016.html | 23 ++ > .../without-ports/017-expected.txt | 4 + > .../webmessaging/without-ports/017.html | 18 ++ > .../without-ports/018-expected.txt | 4 + > .../webmessaging/without-ports/018.html | 17 ++ > .../webmessaging/without-ports/019-1.html | 1 + > .../without-ports/019-expected.txt | 4 + > .../webmessaging/without-ports/019.html | 20 ++ > .../webmessaging/without-ports/020-1.html | 5 + > .../webmessaging/without-ports/020.html | 30 +++ > .../webmessaging/without-ports/021.html | 30 +++ > .../without-ports/023-expected.txt | 3 + > .../webmessaging/without-ports/023.html | 29 +++ > .../without-ports/024-expected.txt | 3 + > .../webmessaging/without-ports/024.html | 14 ++ > .../webmessaging/without-ports/025-1.js | 15 ++ > .../without-ports/025-expected.txt | 5 + > .../webmessaging/without-ports/025.html | 13 ++ > .../without-ports/026-expected.txt | 3 + > .../webmessaging/without-ports/026.html | 16 ++ > .../without-ports/027-expected.txt | 3 + > .../webmessaging/without-ports/027.html | 19 ++ > .../without-ports/028-expected.txt | 3 + > .../webmessaging/without-ports/028.html | 19 ++ > .../without-ports/029-expected.txt | 3 + > .../webmessaging/without-ports/029.html | 20 ++ > .../webmessaging/without-ports/w3c-import.log | 47 ++++ > 195 files changed, 4083 insertions(+) > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/META.yml > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-worker.js > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_properties.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/README.md > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/origin.window.js > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/origin.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/sandboxed.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/worker.js > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.origin.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.ports.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.xorigin.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-1.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-2.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Date.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/020.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/021.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/w3c-import.log > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-1.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020-1.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/021.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029-expected.txt > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029.html > create mode 100644 LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/w3c-import.log > >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 9d67f5c3f73..49c9975b446 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2018-06-25 Frederic Wang <fwang@igalia.com> >+ >+ Import WPT tests for webmessaging >+ https://bugs.webkit.org/show_bug.cgi?id=187001 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Skip some webmessaging tests timing out. >+ >+ * TestExpectations: >+ > 2018-06-25 Antoine Quint <graouts@apple.com> > > [Web Animations] Make imported/mozilla/css-animations/test_animation-pausing.html pass reliably >diff --git a/LayoutTests/TestExpectations b/LayoutTests/TestExpectations >index 4c2cc1873b6..b10f8f7cb1a 100644 >--- a/LayoutTests/TestExpectations >+++ b/LayoutTests/TestExpectations >@@ -641,6 +641,32 @@ webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling > webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-2.html [ ImageOnlyFailure ] > webkit.org/b/180013 imported/w3c/web-platform-tests/mathml/relations/css-styling/lengths-3.html [ Failure ] > >+# These webmessaging WPT tests time out. >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/MessageEvent_properties.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/event.origin.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/event.ports.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/event.source.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/event.source.xorigin.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_Date.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/with-ports/020.html [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/with-ports/021.html [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/without-ports/020.html [ Skip ] >+webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/without-ports/021.html [ Skip ] >+ > # XMLHttpRequest tests requiring DTR/WTR to allow other URLs than localhost to not be blocked and be reachable (www2.localhost) > imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-bogus.htm [ Skip ] > imported/w3c/web-platform-tests/XMLHttpRequest/send-redirect-to-cors.htm [ Skip ] >diff --git a/LayoutTests/imported/w3c/ChangeLog b/LayoutTests/imported/w3c/ChangeLog >index b89b82b4fe2..70b46cbb907 100644 >--- a/LayoutTests/imported/w3c/ChangeLog >+++ b/LayoutTests/imported/w3c/ChangeLog >@@ -1,3 +1,205 @@ >+2018-06-25 Frederic Wang <fwang@igalia.com> >+ >+ Import WPT tests for webmessaging >+ https://bugs.webkit.org/show_bug.cgi?id=187001 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * resources/import-expectations.json: >+ * resources/resource-files.json: >+ * web-platform-tests/webmessaging/Channel_postMessage_Blob-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_Blob.htm: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_clone_port-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_clone_port.htm: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_clone_port_error-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_event_properties-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_event_properties.htm: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_target_source-expected.txt: Added. >+ * web-platform-tests/webmessaging/Channel_postMessage_target_source.htm: Added. >+ * web-platform-tests/webmessaging/META.yml: Added. >+ * web-platform-tests/webmessaging/MessageEvent-expected.txt: Added. >+ * web-platform-tests/webmessaging/MessageEvent-trusted-expected.txt: Added. >+ * web-platform-tests/webmessaging/MessageEvent-trusted-worker.js: Added. >+ * web-platform-tests/webmessaging/MessageEvent-trusted.html: Added. >+ * web-platform-tests/webmessaging/MessageEvent.html: Added. >+ * web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html: Added. >+ * web-platform-tests/webmessaging/MessageEvent_properties.htm: Added. >+ * web-platform-tests/webmessaging/MessagePort_initial_disabled-expected.txt: Added. >+ * web-platform-tests/webmessaging/MessagePort_initial_disabled.htm: Added. >+ * web-platform-tests/webmessaging/MessagePort_onmessage_start-expected.txt: Added. >+ * web-platform-tests/webmessaging/MessagePort_onmessage_start.htm: Added. >+ * web-platform-tests/webmessaging/README.md: Added. >+ * web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/basics.html: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/blobs.html: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/interface.html: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/origin.window.js: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/resources/origin.html: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/resources/sandboxed.html: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/resources/w3c-import.log: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/resources/worker.js: Added. >+ (handler): >+ * web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/sandbox.html: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/w3c-import.log: Added. >+ * web-platform-tests/webmessaging/broadcastchannel/workers.html: Added. >+ * web-platform-tests/webmessaging/event.data.sub.htm: Added. >+ * web-platform-tests/webmessaging/event.origin.sub.htm: Added. >+ * web-platform-tests/webmessaging/event.ports.sub.htm: Added. >+ * web-platform-tests/webmessaging/event.source.htm: Added. >+ * web-platform-tests/webmessaging/event.source.xorigin.sub.htm: Added. >+ * web-platform-tests/webmessaging/message-channels/001-expected.txt: Added. >+ * web-platform-tests/webmessaging/message-channels/001.html: Added. >+ * web-platform-tests/webmessaging/message-channels/002-expected.txt: Added. >+ * web-platform-tests/webmessaging/message-channels/002.html: Added. >+ * web-platform-tests/webmessaging/message-channels/003-expected.txt: Added. >+ * web-platform-tests/webmessaging/message-channels/003.html: Added. >+ * web-platform-tests/webmessaging/message-channels/004-1.html: Added. >+ * web-platform-tests/webmessaging/message-channels/004-2.html: Added. >+ * web-platform-tests/webmessaging/message-channels/004-expected.txt: Added. >+ * web-platform-tests/webmessaging/message-channels/004.html: Added. >+ * web-platform-tests/webmessaging/message-channels/close-expected.txt: Added. >+ * web-platform-tests/webmessaging/message-channels/close.html: Added. >+ * web-platform-tests/webmessaging/message-channels/w3c-import.log: Added. >+ * web-platform-tests/webmessaging/message-channels/worker-expected.txt: Added. >+ * web-platform-tests/webmessaging/message-channels/worker.html: Added. >+ * web-platform-tests/webmessaging/messageerror-expected.txt: Added. >+ * web-platform-tests/webmessaging/messageerror.html: Added. >+ * web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_Date.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_Document-expected.txt: Added. >+ * web-platform-tests/webmessaging/postMessage_Document.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_Function-expected.txt: Added. >+ * web-platform-tests/webmessaging/postMessage_Function.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_arrays.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_dup_transfer_objects-expected.txt: Added. >+ * web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_invalid_targetOrigin-expected.txt: Added. >+ * web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_objects.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm: Added. >+ * web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm: Added. >+ * web-platform-tests/webmessaging/w3c-import.log: Added. >+ * web-platform-tests/webmessaging/with-ports/001-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/001.html: Added. >+ * web-platform-tests/webmessaging/with-ports/002-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/002.html: Added. >+ * web-platform-tests/webmessaging/with-ports/003-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/003.html: Added. >+ * web-platform-tests/webmessaging/with-ports/004-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/004.html: Added. >+ * web-platform-tests/webmessaging/with-ports/005-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/005.html: Added. >+ * web-platform-tests/webmessaging/with-ports/006-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/006.html: Added. >+ * web-platform-tests/webmessaging/with-ports/007-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/007.html: Added. >+ * web-platform-tests/webmessaging/with-ports/010-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/010.html: Added. >+ * web-platform-tests/webmessaging/with-ports/011-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/011.html: Added. >+ * web-platform-tests/webmessaging/with-ports/012-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/012.html: Added. >+ * web-platform-tests/webmessaging/with-ports/013-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/013.html: Added. >+ * web-platform-tests/webmessaging/with-ports/014-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/014.html: Added. >+ * web-platform-tests/webmessaging/with-ports/015-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/015.html: Added. >+ * web-platform-tests/webmessaging/with-ports/016-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/016.html: Added. >+ * web-platform-tests/webmessaging/with-ports/017-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/017.html: Added. >+ * web-platform-tests/webmessaging/with-ports/018-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/018.html: Added. >+ * web-platform-tests/webmessaging/with-ports/019-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/019.html: Added. >+ * web-platform-tests/webmessaging/with-ports/020.html: Added. >+ * web-platform-tests/webmessaging/with-ports/021.html: Added. >+ * web-platform-tests/webmessaging/with-ports/023-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/023.html: Added. >+ * web-platform-tests/webmessaging/with-ports/024-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/024.html: Added. >+ * web-platform-tests/webmessaging/with-ports/025-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/025.html: Added. >+ * web-platform-tests/webmessaging/with-ports/026-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/026.html: Added. >+ * web-platform-tests/webmessaging/with-ports/027-expected.txt: Added. >+ * web-platform-tests/webmessaging/with-ports/027.html: Added. >+ * web-platform-tests/webmessaging/with-ports/w3c-import.log: Added. >+ * web-platform-tests/webmessaging/without-ports/001-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/001.html: Added. >+ * web-platform-tests/webmessaging/without-ports/002-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/002.html: Added. >+ * web-platform-tests/webmessaging/without-ports/003-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/003.html: Added. >+ * web-platform-tests/webmessaging/without-ports/004-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/004.html: Added. >+ * web-platform-tests/webmessaging/without-ports/005-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/005.html: Added. >+ * web-platform-tests/webmessaging/without-ports/006-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/006.html: Added. >+ * web-platform-tests/webmessaging/without-ports/007-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/007.html: Added. >+ * web-platform-tests/webmessaging/without-ports/008-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/008.html: Added. >+ * web-platform-tests/webmessaging/without-ports/009-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/009.html: Added. >+ * web-platform-tests/webmessaging/without-ports/010-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/010.html: Added. >+ * web-platform-tests/webmessaging/without-ports/011-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/011.html: Added. >+ * web-platform-tests/webmessaging/without-ports/012-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/012.html: Added. >+ * web-platform-tests/webmessaging/without-ports/013-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/013.html: Added. >+ * web-platform-tests/webmessaging/without-ports/014-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/014.html: Added. >+ * web-platform-tests/webmessaging/without-ports/015-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/015.html: Added. >+ * web-platform-tests/webmessaging/without-ports/016-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/016.html: Added. >+ * web-platform-tests/webmessaging/without-ports/017-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/017.html: Added. >+ * web-platform-tests/webmessaging/without-ports/018-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/018.html: Added. >+ * web-platform-tests/webmessaging/without-ports/019-1.html: Added. >+ * web-platform-tests/webmessaging/without-ports/019-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/019.html: Added. >+ * web-platform-tests/webmessaging/without-ports/020-1.html: Added. >+ * web-platform-tests/webmessaging/without-ports/020.html: Added. >+ * web-platform-tests/webmessaging/without-ports/021.html: Added. >+ * web-platform-tests/webmessaging/without-ports/023-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/023.html: Added. >+ * web-platform-tests/webmessaging/without-ports/024-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/024.html: Added. >+ * web-platform-tests/webmessaging/without-ports/025-1.js: Added. >+ (test): >+ * web-platform-tests/webmessaging/without-ports/025-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/025.html: Added. >+ * web-platform-tests/webmessaging/without-ports/026-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/026.html: Added. >+ * web-platform-tests/webmessaging/without-ports/027-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/027.html: Added. >+ * web-platform-tests/webmessaging/without-ports/028-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/028.html: Added. >+ * web-platform-tests/webmessaging/without-ports/029-expected.txt: Added. >+ * web-platform-tests/webmessaging/without-ports/029.html: Added. >+ * web-platform-tests/webmessaging/without-ports/w3c-import.log: Added. >+ > 2018-06-19 Youenn Fablet <youenn@apple.com> > > RTCRtpSender.replaceTrack(null) ends current track >diff --git a/LayoutTests/imported/w3c/resources/import-expectations.json b/LayoutTests/imported/w3c/resources/import-expectations.json >index d771685db53..42656d43ee6 100644 >--- a/LayoutTests/imported/w3c/resources/import-expectations.json >+++ b/LayoutTests/imported/w3c/resources/import-expectations.json >@@ -336,6 +336,7 @@ > "web-platform-tests/webdriver": "skip", > "web-platform-tests/webgl": "skip", > "web-platform-tests/webmessaging": "skip", >+ "web-platform-tests/webmessaging/": "import", > "web-platform-tests/webrtc": "import", > "web-platform-tests/websockets": "skip", > "web-platform-tests/webstorage": "skip", >diff --git a/LayoutTests/imported/w3c/resources/resource-files.json b/LayoutTests/imported/w3c/resources/resource-files.json >index ce605d91b2d..dfcceab150f 100644 >--- a/LayoutTests/imported/w3c/resources/resource-files.json >+++ b/LayoutTests/imported/w3c/resources/resource-files.json >@@ -1109,6 +1109,10 @@ > "web-platform-tests/service-workers/service-worker/multi-globals/relevant/relevant.https.html", > "web-platform-tests/test_keys_wdspec.html", > "web-platform-tests/upgrade-insecure-requests/support/post-origin-to-parent.html", >+ "web-platform-tests/webmessaging/message-channels/004-1.html", >+ "web-platform-tests/webmessaging/message-channels/004-2.html", >+ "web-platform-tests/webmessaging/without-ports/019-1.html", >+ "web-platform-tests/webmessaging/without-ports/020-1.html", > "web-platform-tests/workers/data-url-shared-window.html", > "web-platform-tests/workers/non-automated/application-cache-dedicated.html", > "web-platform-tests/workers/non-automated/infinite-nested.html", >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob-expected.txt >new file mode 100644 >index 00000000000..b63d6d3682a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: Messages can contain Blobs. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.htm >new file mode 100644 >index 00000000000..c8c247ef59d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.htm >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage() with a Blob </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ var TARGET = null; >+ var SOURCE = null; >+ var description = "Messages can contain Blobs."; >+ >+ var t = async_test("Test Description: " + description); >+ >+ var channel = new MessageChannel(); >+ SOURCE = channel.port1; >+ TARGET = channel.port2; >+ TARGET.start(); >+ TARGET.addEventListener("message", t.step_func(TestMessageEvent), true); >+ >+ (function() { >+ SOURCE.postMessage({blob: new Blob(['foo', 'bar'])}); >+ })(); >+ // TODO(https://github.com/web-platform-tests/wpt/issues/7899): Change to >+ // some sort of cross-browser GC trigger. >+ if (self.gc) self.gc(); >+ >+ function TestMessageEvent(evt) >+ { >+ assert_true('blob' in evt.data); >+ assert_true(evt.data.blob instanceof Blob); >+ assert_equals(evt.data.blob.size, 6); >+ const reader = new FileReader(); >+ reader.onerror = t.unreached_func('Reading blob failed'); >+ reader.onload = t.step_func(() => { >+ assert_equals(reader.result, 'foobar'); >+ t.done(); >+ }); >+ reader.readAsText(evt.data.blob); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr-expected.txt >new file mode 100644 >index 00000000000..8cfbd46f2cc >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Throw a DataCloneError when a host object (e.g. a DOM node) is used with postMessage. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm >new file mode 100644 >index 00000000000..9f4cd6b9be7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage() with a host object raises DataCloneError </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ >+ var description = "Throw a DataCloneError when a host object (e.g. a DOM node) is used with postMessage."; >+ >+ test(function() >+ { >+ var channel = new MessageChannel(); >+ channel.port1.start(); >+ >+ assert_throws("DATA_CLONE_ERR", function() >+ { >+ channel.port1.postMessage(navigator); >+ }); >+ }, description); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port-expected.txt >new file mode 100644 >index 00000000000..419f818d636 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port-expected.txt >@@ -0,0 +1,4 @@ >+ >+PASS Test Description: Test Description: When the user agent is to clone a port original port, with the clone being owned by owner, it must return a new MessagePort object >+PASS Data sent through remote port is received by the new cloned port >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port.htm >new file mode 100644 >index 00000000000..0e2e2fcd141 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port.htm >@@ -0,0 +1,42 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage(): clone a port </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ var OriginalPort = null; >+ var ClonedPort = null; >+ var description = "Test Description: When the user agent is to clone a port original port, with " >+ + "the clone being owned by owner, it must return a new MessagePort object"; >+ >+ var t = async_test("Test Description: " + description); >+ >+ var ChannelA = new MessageChannel(); >+ var ChannelB = new MessageChannel(); >+ OriginalPort = ChannelB.port2; >+ >+ ChannelA.port2.onmessage = t.step_func(function(evt) >+ { >+ if(evt.data == "ports") >+ { >+ ClonedPort = evt.ports[0]; >+ >+ assert_not_equals(ClonedPort, OriginalPort, "new cloned port object should not equal to the original port!"); >+ >+ ClonedPort.onmessage = function(e) >+ { >+ test(function(){ assert_equals(e.data, "ping"); }, "Data sent through remote port is received by the new cloned port"); >+ t.done(); >+ } >+ } >+ }); >+ >+ ChannelA.port1.postMessage("ports", [OriginalPort]); >+ ChannelB.port1.postMessage("ping"); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error-expected.txt >new file mode 100644 >index 00000000000..2c3774d5ab9 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: Throw a DataCloneError if transfer array in postMessage contains source port. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm >new file mode 100644 >index 00000000000..c33feaa5f09 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage() DataCloneError: cloning source port </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ >+ var description = "Test Description: Throw a DataCloneError if transfer array in postMessage contains source port."; >+ >+ test(function() >+ { >+ var channel = new MessageChannel(); >+ channel.port1.start(); >+ >+ assert_throws("DATA_CLONE_ERR", function() >+ { >+ channel.port1.postMessage("ports", [channel.port1]); >+ }); >+ }, description); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties-expected.txt >new file mode 100644 >index 00000000000..5282f24f9cb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: The postMessage() method - Create an event that uses the MessageEvent interface, with the name message, which does not bubble and is not cancelable. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties.htm >new file mode 100644 >index 00000000000..4be7203fce8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties.htm >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage(): MessageEvent properties </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ >+ var TargetPort = null; >+ var description = "The postMessage() method - Create an event that uses the MessageEvent interface, " >+ + "with the name message, which does not bubble and is not cancelable."; >+ >+ var t = async_test("Test Description: " + description); >+ >+ var channel = new MessageChannel(); >+ >+ TargetPort = channel.port2; >+ TargetPort.start(); >+ TargetPort.addEventListener("message", t.step_func(TestMessageEvent), true); >+ >+ channel.port1.postMessage("ping"); >+ >+ function TestMessageEvent(evt) >+ { >+ ExpectedResult = [true, "message", false, false]; >+ ActualResult = [(evt instanceof MessageEvent), evt.type, evt.bubbles, evt.cancelable]; >+ >+ assert_array_equals(ActualResult, ExpectedResult); >+ t.done(); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array-expected.txt >new file mode 100644 >index 00000000000..2682c9bc64b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: The postMessage() method - Make new ports into a read only array. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm >new file mode 100644 >index 00000000000..4ccf3ac4f35 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage(): read-only ports array </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ "use strict"; >+ >+ var TargetPort = null; >+ var description = "The postMessage() method - Make new ports into a read only array."; >+ >+ var t = async_test("Test Description: " + description); >+ >+ var channel = new MessageChannel(); >+ >+ TargetPort = channel.port2; >+ TargetPort.start(); >+ TargetPort.addEventListener("message", t.step_func(TestMessageEvent), true); >+ >+ var channel2 = new MessageChannel(); >+ >+ channel.port1.postMessage("ports", [channel2.port1]); >+ >+ function TestMessageEvent(evt) >+ { >+ var channel3 = new MessageChannel(); >+ assert_throws(new TypeError(), () => { >+ evt.ports.push(channel3.port1); >+ }, "ports is a frozen object"); >+ assert_equals(evt.ports.length, 1, "ports is a read only array with length == 1."); >+ t.done(); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source-expected.txt >new file mode 100644 >index 00000000000..fc6d3412a69 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: The postMessage() method - Let target port be the port with which source port is entangled, if any. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source.htm >new file mode 100644 >index 00000000000..4b00e68d49e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source.htm >@@ -0,0 +1,35 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage(): target port and source port </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+<script> >+ >+ var TARGET = null; >+ var SOURCE = null; >+ var description = "The postMessage() method - Let target port be the port with which source " >+ + "port is entangled, if any."; >+ >+ var t = async_test("Test Description: " + description); >+ >+ var channel = new MessageChannel(); >+ SOURCE = channel.port1; >+ TARGET = channel.port2; >+ TARGET.start(); >+ TARGET.addEventListener("message", t.step_func(TestMessageEvent), true); >+ >+ SOURCE.postMessage("ping"); >+ >+ function TestMessageEvent(evt) >+ { >+ assert_equals(evt.target, TARGET); >+ assert_not_equals(evt.target, SOURCE); >+ t.done(); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/META.yml b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/META.yml >new file mode 100644 >index 00000000000..8831129e2fd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/META.yml >@@ -0,0 +1,6 @@ >+suggested_reviewers: >+ - zqzhang >+ - aogilvie >+ - jdm >+ - mkruisselbrink >+ - annevk >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-expected.txt >new file mode 100644 >index 00000000000..77b50583b7e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-expected.txt >@@ -0,0 +1,11 @@ >+ >+PASS mozInitMessageEvent on the prototype >+PASS mozInitMessageEvent on the instance >+PASS msInitMessageEvent on the prototype >+PASS msInitMessageEvent on the instance >+PASS oInitMessageEvent on the prototype >+PASS oInitMessageEvent on the instance >+PASS webkitInitMessageEvent on the prototype >+PASS webkitInitMessageEvent on the instance >+PASS initMessageEvent with no arguments >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-expected.txt >new file mode 100644 >index 00000000000..b0a38f76495 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-expected.txt >@@ -0,0 +1,5 @@ >+ >+PASS With a MessageChannel and its MessagePorts >+FAIL With a BroadcastChannel assert_true: The browser must support BroadcastChannel expected true got false >+PASS With window >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-worker.js b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-worker.js >new file mode 100644 >index 00000000000..6e8c3a781bf >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-worker.js >@@ -0,0 +1,4 @@ >+"use strict"; >+ >+const channel = new BroadcastChannel("channel name"); >+channel.postMessage("ping"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted.html >new file mode 100644 >index 00000000000..8cde663339d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted.html >@@ -0,0 +1,45 @@ >+<!DOCTYPE html> >+<title>MessagePort message events are trusted</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/comms.html#dom-messageport-postmessage"> >+<!-- See also: >+- https://github.com/whatwg/html/issues/1602 >+- https://github.com/whatwg/html/pull/1935 >+--> >+ >+<script> >+"use strict"; >+ >+async_test(t => { >+ assert_true("MessageChannel" in self, "The browser must support MessageChannel"); >+ >+ const channel = new MessageChannel(); >+ >+ channel.port2.onmessage = t.step_func_done(e => { >+ assert_equals(e.isTrusted, true); >+ }); >+ >+ channel.port1.postMessage("ping"); >+}, "With a MessageChannel and its MessagePorts"); >+ >+async_test(t => { >+ assert_true("BroadcastChannel" in self, "The browser must support BroadcastChannel"); >+ >+ const channel = new BroadcastChannel("channel name"); >+ >+ channel.onmessage = t.step_func_done(e => { >+ assert_equals(e.isTrusted, true); >+ }); >+ >+ new Worker("MessageEvent-trusted-worker.js"); >+}, "With a BroadcastChannel"); >+ >+async_test(t => { >+ window.onmessage = t.step_func_done(e => { >+ assert_equals(e.isTrusted, true); >+ }); >+ >+ window.postMessage("ping", "*"); >+}, "With window"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html >new file mode 100644 >index 00000000000..4fb68b5999b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html >@@ -0,0 +1,28 @@ >+<!doctype html> >+<meta charset=utf-8> >+<title>MessageEvent</title> >+<script src=/resources/testharness.js></script> >+<script src=/resources/testharnessreport.js></script> >+<div id=log></div> >+<script> >+var prefixes = ['moz', 'ms', 'o', 'webkit']; >+prefixes.forEach(function(prefix) { >+ var name = prefix + "InitMessageEvent"; >+ >+ test(function() { >+ assert_false(name in MessageEvent.prototype); >+ }, name + " on the prototype"); >+ >+ test(function() { >+ var event = new MessageEvent("message"); >+ assert_false(name in event); >+ }, name + " on the instance"); >+}); >+ >+test(function() { >+ var event = new MessageEvent("message"); >+ assert_throws(new TypeError(), function() { >+ event.initMessageEvent(); >+ }, "Not enough arguments to initMessageEvent"); >+}, "initMessageEvent with no arguments"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html >new file mode 100644 >index 00000000000..179bc0cc4a1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html >@@ -0,0 +1,31 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title>MessageEvent: onmessage infinite loop</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<script> >+'use strict'; >+ >+// The test passes if the onmessage / postMessage loop does not prevent the >+// step_timeout task from ever being run. In particular there should be no >+// infinite loop or stack overflow. >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ var count = 0; >+ channel.port1.addEventListener("message", t.step_func(function() { >+ count++; >+ assert_less_than(count, 1000, "There were many message events without " + >+ "t.step_timeout ever being called."); >+ })); >+ channel.port1.addEventListener("message", t.step_func(function() { >+ channel.port2.postMessage(0); >+ })); >+ channel.port1.start(); >+ channel.port2.postMessage(0); >+ >+ t.step_timeout(function() { t.done(); }, 0); >+}, "onmessage calling source postMessage"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_properties.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_properties.htm >new file mode 100644 >index 00000000000..389add98d1f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_properties.htm >@@ -0,0 +1,32 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> MessageEvent interface and properties </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="do_test()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+async_test(function() { >+ window.do_test = this.step_func(function() { >+ document.querySelector("iframe").contentWindow.postMessage("foo", "*"); >+ }) >+ >+ window.addEventListener("message", this.step_func_done(function(e) { >+ e.preventDefault(); >+ assert_true(e instanceof MessageEvent, "Should be MessageEvent"); >+ assert_equals(e.type, "message"); >+ assert_false(e.bubbles, "bubbles"); >+ assert_false(e.cancelable, "cancelable"); >+ assert_false(e.defaultPrevented, "defaultPrevented"); >+ }), false); >+}); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled-expected.txt >new file mode 100644 >index 00000000000..b7aa358eb6a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS MessageChannel: port message queue is initially disabled >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled.htm >new file mode 100644 >index 00000000000..58447dc2d6e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled.htm >@@ -0,0 +1,13 @@ >+<!DOCTYPE html> >+<title>MessageChannel: port message queue is initially disabled</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ channel.port2.addEventListener("message", t.unreached_func(), true); >+ channel.port1.postMessage("ping"); >+ setTimeout(t.step_func_done(), 100); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start-expected.txt >new file mode 100644 >index 00000000000..2b3b2df6b12 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS MessageChannel: port.onmessage enables message queue >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.htm >new file mode 100644 >index 00000000000..dc4dc1e54b5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.htm >@@ -0,0 +1,13 @@ >+<!DOCTYPE html> >+<title>MessageChannel: port.onmessage enables message queue</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ channel.port2.onmessage = t.step_func_done(); >+ channel.port1.postMessage("ping"); >+ setTimeout(t.unreached_func(), 100); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/README.md b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/README.md >new file mode 100644 >index 00000000000..0b81aa0658c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/README.md >@@ -0,0 +1,2 @@ >+These are the cross-document messaging (`postMessage()`) tests for the >+[cross-document messaging chapter of the HTML Standard](https://html.spec.whatwg.org/multipage/comms.html#web-messaging). >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm >new file mode 100644 >index 00000000000..55c3dbdba18 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm >@@ -0,0 +1,60 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Transferred objects are no longer usable on the sending side </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "Objects listed in transfer are transferred, not just cloned, meaning that they are " + >+ "no longer usable on the sending side."; >+ >+ var t = async_test(description); >+ >+ var DATA = {test: "e.ports[0].postMessage('TRANSFERRED')"}; >+ var TARGET = document.querySelector("iframe"); >+ var ExpectedResult = ["PING", "TRANSFERRED"]; >+ var ActualResult = []; >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_own_property(window, "MessageChannel", "window"); >+ >+ var channel = new MessageChannel(); >+ >+ channel.port2.onmessage = t.step_func(VerifyResult); >+ >+ channel.port1.postMessage("PING"); >+ >+ TARGET.contentWindow.postMessage(DATA, "*", [channel.port1]); >+ >+ channel.port1.postMessage("PONG"); >+ >+ }, "MessageChannel is supported."); >+ } >+ >+ function VerifyResult(e) >+ { >+ ActualResult.push(e.data) >+ >+ if (ActualResult.length >= ExpectedResult.length) >+ { >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ } >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt >new file mode 100644 >index 00000000000..b390f46481a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt >@@ -0,0 +1,7 @@ >+ >+FAIL postMessage results in correct event Can't find variable: BroadcastChannel >+FAIL messages are delivered in port creation order Can't find variable: BroadcastChannel >+FAIL messages aren't delivered to a closed port Can't find variable: BroadcastChannel >+FAIL closing and creating channels during message delivery works correctly Can't find variable: BroadcastChannel >+FAIL Closing a channel in onmessage doesn't cancel already queued events Can't find variable: BroadcastChannel >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html >new file mode 100644 >index 00000000000..ed16e32f543 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html >@@ -0,0 +1,120 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+ >+async_test(t => { >+ let c1 = new BroadcastChannel('eventType'); >+ let c2 = new BroadcastChannel('eventType'); >+ >+ c2.onmessage = t.step_func(e => { >+ assert_true(e instanceof MessageEvent); >+ assert_equals(e.target, c2); >+ assert_equals(e.type, 'message'); >+ assert_equals(e.origin, location.origin, 'origin'); >+ assert_equals(e.data, 'hello world'); >+ assert_equals(e.source, null, 'source'); >+ t.done(); >+ }); >+ c1.postMessage('hello world'); >+ }, 'postMessage results in correct event'); >+ >+async_test(t => { >+ let c1 = new BroadcastChannel('order'); >+ let c2 = new BroadcastChannel('order'); >+ let c3 = new BroadcastChannel('order'); >+ >+ let events = []; >+ let doneCount = 0; >+ let handler = t.step_func(e => { >+ events.push(e); >+ if (e.data == 'done') { >+ doneCount++; >+ if (doneCount == 2) { >+ assert_equals(events.length, 6); >+ assert_equals(events[0].target, c2, 'target for event 0'); >+ assert_equals(events[0].data, 'from c1'); >+ assert_equals(events[1].target, c3, 'target for event 1'); >+ assert_equals(events[1].data, 'from c1'); >+ assert_equals(events[2].target, c1, 'target for event 2'); >+ assert_equals(events[2].data, 'from c3'); >+ assert_equals(events[3].target, c2, 'target for event 3'); >+ assert_equals(events[3].data, 'from c3'); >+ assert_equals(events[4].target, c1, 'target for event 4'); >+ assert_equals(events[4].data, 'done'); >+ assert_equals(events[5].target, c3, 'target for event 5'); >+ assert_equals(events[5].data, 'done'); >+ t.done(); >+ } >+ } >+ }); >+ c1.onmessage = handler; >+ c2.onmessage = handler; >+ c3.onmessage = handler; >+ >+ c1.postMessage('from c1'); >+ c3.postMessage('from c3'); >+ c2.postMessage('done'); >+ }, 'messages are delivered in port creation order'); >+ >+async_test(t => { >+ let c1 = new BroadcastChannel('closed'); >+ let c2 = new BroadcastChannel('closed'); >+ let c3 = new BroadcastChannel('closed'); >+ >+ c2.onmessage = t.unreached_func(); >+ c2.close(); >+ c3.onmessage = t.step_func(() => t.done()); >+ c1.postMessage('test'); >+ }, 'messages aren\'t delivered to a closed port'); >+ >+async_test(t => { >+ let c1 = new BroadcastChannel('create-in-onmessage'); >+ let c2 = new BroadcastChannel('create-in-onmessage'); >+ >+ c2.onmessage = t.step_func(e => { >+ assert_equals(e.data, 'first'); >+ c2.close(); >+ let c3 = new BroadcastChannel('create-in-onmessage'); >+ c3.onmessage = t.step_func(event => { >+ assert_equals(event.data, 'done'); >+ t.done(); >+ }); >+ c1.postMessage('done'); >+ }); >+ c1.postMessage('first'); >+ c2.postMessage('second'); >+ }, 'closing and creating channels during message delivery works correctly'); >+ >+// TODO(mek): Depending on https://github.com/whatwg/html/issues/1371 adjust >+// this test to match the correct behavior. >+async_test(t => { >+ let c1 = new BroadcastChannel('close-in-onmessage'); >+ let c2 = new BroadcastChannel('close-in-onmessage'); >+ let c3 = new BroadcastChannel('close-in-onmessage'); >+ let events = []; >+ c1.onmessage = e => events.push('c1: ' + e.data); >+ c2.onmessage = e => events.push('c2: ' + e.data); >+ c3.onmessage = e => events.push('c3: ' + e.data); >+ >+ // c2 closes itself when it receives the first message >+ c2.addEventListener('message', e => { >+ c2.close(); >+ }); >+ >+ c3.addEventListener('message', t.step_func(e => { >+ if (e.data == 'done') { >+ assert_array_equals(events, [ >+ 'c2: first', >+ 'c3: first', >+ 'c2: done', >+ 'c3: done']); >+ t.done(); >+ } >+ })); >+ c1.postMessage('first'); >+ c1.postMessage('done'); >+ }, 'Closing a channel in onmessage doesn\'t cancel already queued events'); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt >new file mode 100644 >index 00000000000..7080be7db86 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs-expected.txt >@@ -0,0 +1,4 @@ >+ >+FAIL Blobs work on BroadcastChannel Can't find variable: BroadcastChannel >+FAIL Blobs work with workers on BroadcastChannel Can't find variable: BroadcastChannel >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html >new file mode 100644 >index 00000000000..1f0e2f1f1d6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html >@@ -0,0 +1,83 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+async_test(t => { >+ const c1 = new BroadcastChannel('blob'); >+ const c2 = new BroadcastChannel('blob'); >+ const c3 = new BroadcastChannel('blob'); >+ >+ let readCount = 0; >+ c2.onmessage = t.step_func(e => { >+ // check blob >+ assert_true('blob' in e.data); >+ assert_true(e.data.blob instanceof Blob); >+ assert_equals(e.data.blob.size, 6); >+ const reader = new FileReader(); >+ reader.onerror = t.unreached_func(); >+ reader.onload = t.step_func(() => { >+ assert_equals(reader.result, 'foobar'); >+ if (++readCount == 2) >+ t.done(); >+ }); >+ reader.readAsText(e.data.blob); >+ }); >+ c3.onmessage = c2.onmessage; >+ (() => { >+ c1.postMessage({blob: new Blob(['foo', 'bar'])}); >+ })(); >+ // TODO(https://github.com/web-platform-tests/wpt/issues/7899): Change to >+ // some sort of cross-browser GC trigger. >+ if (self.gc) self.gc(); >+ }, 'Blobs work on BroadcastChannel'); >+ >+async_test(t => { >+ const c1 = new BroadcastChannel('blobworker'); >+ const c2 = new BroadcastChannel('blobworker'); >+ const events = []; >+ >+ const verifyEvents = function() { >+ assert_equals(events.length, 5); >+ assert_equals(events[0], 'from worker'); >+ assert_equals(events[1], 'from worker'); >+ assert_true(events[2].blob instanceof Blob); >+ assert_equals(events[2].blob.size, 11); >+ assert_true(events[3].blob instanceof Blob); >+ assert_equals(events[3].blob.size, 11); >+ assert_equals(events[4], 'done'); >+ const reader = new FileReader(); >+ reader.onerror = t.unreached_func(); >+ reader.onload = t.step_func(() => { >+ assert_equals(reader.result, 'hello-world'); >+ t.done(); >+ }); >+ reader.readAsText(events[3].blob); >+ }; >+ >+ let receivedDone = false; >+ let receivedWorkerDone = false; >+ >+ c1.onmessage = e => events.push(e.data); >+ c2.onmessage = e => events.push(e.data); >+ c2.addEventListener('message', t.step_func(e => { >+ if (e.data.blob) >+ c1.postMessage('done'); >+ if (e.data === 'done') >+ receivedDone = true; >+ if (receivedDone && receivedWorkerDone) >+ verifyEvents(); >+ })); >+ >+ const worker = new Worker('resources/worker.js'); >+ worker.onmessage = t.step_func(e => { >+ receivedWorkerDone = true; >+ if (receivedDone && receivedWorkerDone) >+ verifyEvents(); >+ }); >+ worker.postMessage({channel: 'blobworker'}); >+ worker.postMessage({blob: ['hello-world']}); >+ >+ }, 'Blobs work with workers on BroadcastChannel'); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt >new file mode 100644 >index 00000000000..8f87b0db40f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt >@@ -0,0 +1,15 @@ >+ >+FAIL Should throw if no name is provided assert_throws: function "() => new BroadcastChannel()" threw object "ReferenceError: Can't find variable: BroadcastChannel" ("ReferenceError") expected object "TypeError" ("TypeError") >+FAIL Null name should not throw Can't find variable: BroadcastChannel >+FAIL Undefined name should not throw Can't find variable: BroadcastChannel >+FAIL Non-empty name should not throw Can't find variable: BroadcastChannel >+FAIL Non-string name should not throw Can't find variable: BroadcastChannel >+FAIL postMessage without parameters should throw Can't find variable: BroadcastChannel >+FAIL postMessage with null should not throw Can't find variable: BroadcastChannel >+FAIL close should not throw Can't find variable: BroadcastChannel >+FAIL close should not throw when called multiple times Can't find variable: BroadcastChannel >+FAIL postMessage after close should throw Can't find variable: BroadcastChannel >+FAIL BroadcastChannel should have an onmessage event Can't find variable: BroadcastChannel >+FAIL postMessage should throw with uncloneable data Can't find variable: BroadcastChannel >+FAIL postMessage should throw InvalidStateError after close, even with uncloneable data Can't find variable: BroadcastChannel >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html >new file mode 100644 >index 00000000000..a552563ed66 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html >@@ -0,0 +1,73 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+ >+test(() => assert_throws(new TypeError(), () => new BroadcastChannel()), >+ 'Should throw if no name is provided'); >+ >+test(() => { >+ let c = new BroadcastChannel(null); >+ assert_equals(c.name, 'null'); >+ }, 'Null name should not throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(undefined); >+ assert_equals(c.name, 'undefined'); >+ }, 'Undefined name should not throw'); >+ >+test(() => { >+ let c = new BroadcastChannel('fooBar'); >+ assert_equals(c.name, 'fooBar'); >+ }, 'Non-empty name should not throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(123); >+ assert_equals(c.name, '123'); >+ }, 'Non-string name should not throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ assert_throws(new TypeError(), () => c.postMessage()); >+ }, 'postMessage without parameters should throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ c.postMessage(null); >+ }, 'postMessage with null should not throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ c.close(); >+ }, 'close should not throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ c.close(); >+ c.close(); >+ }, 'close should not throw when called multiple times'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ c.close(); >+ assert_throws('InvalidStateError', () => c.postMessage('')); >+ }, 'postMessage after close should throw'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ assert_not_equals(c.onmessage, undefined); >+ }, 'BroadcastChannel should have an onmessage event'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ assert_throws('DataCloneError', () => c.postMessage(Symbol())); >+ }, 'postMessage should throw with uncloneable data'); >+ >+test(() => { >+ let c = new BroadcastChannel(''); >+ c.close(); >+ assert_throws('InvalidStateError', () => c.postMessage(Symbol())); >+ }, 'postMessage should throw InvalidStateError after close, even with uncloneable data'); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/origin.window.js b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/origin.window.js >new file mode 100644 >index 00000000000..7e9d602af19 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/origin.window.js >@@ -0,0 +1,10 @@ >+async_test(t => { >+ const crossOriginURL = new URL("resources/origin.html", self.location.href).href.replace("://", "://天æ°ã®è¯ãæ¥."), >+ frame = document.createElement("iframe"); >+ frame.src = crossOriginURL; >+ document.body.appendChild(frame); >+ t.add_cleanup(() => frame.remove()); >+ self.onmessage = t.step_func_done(e => { >+ assert_equals(e.data, self.origin.replace("://", "://xn--n8j6ds53lwwkrqhv28a.")); >+ }); >+}, "Serialization of BroadcastChannel origin"); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/origin.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/origin.html >new file mode 100644 >index 00000000000..f57d582bbb8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/origin.html >@@ -0,0 +1,8 @@ >+<script> >+const bc1 = new BroadcastChannel("ladila"), >+ bc2 = new BroadcastChannel("ladila"); >+bc2.onmessage = e => { >+ parent.postMessage(e.origin, "*"); >+} >+bc1.postMessage("does not matter"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/sandboxed.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/sandboxed.html >new file mode 100644 >index 00000000000..e32962cdfd4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/sandboxed.html >@@ -0,0 +1,10 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<script> >+try { >+ let c = new BroadcastChannel('foo'); >+ parent.postMessage('Created', '*'); >+} catch (e) { >+ parent.postMessage('Exception: ' + e.name, '*'); >+} >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/w3c-import.log >new file mode 100644 >index 00000000000..0b9826b1a46 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/w3c-import.log >@@ -0,0 +1,19 @@ >+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/webmessaging/broadcastchannel/resources/origin.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/sandboxed.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/worker.js >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/worker.js b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/worker.js >new file mode 100644 >index 00000000000..9364c602756 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/worker.js >@@ -0,0 +1,31 @@ >+var c; >+ >+function handler(e, reply) { >+ if (e.data.ping) { >+ c.postMessage(e.data.ping); >+ return; >+ } >+ if (e.data.blob) { >+ (() => { >+ c.postMessage({blob: new Blob(e.data.blob)}); >+ })(); >+ // TODO(https://github.com/web-platform-tests/wpt/issues/7899): Change to >+ // some sort of cross-browser GC trigger. >+ if (self.gc) self.gc(); >+ } >+ c = new BroadcastChannel(e.data.channel); >+ let messages = []; >+ c.onmessage = e => { >+ messages.push(e.data); >+ if (e.data == 'done') >+ reply(messages); >+ }; >+ c.postMessage('from worker'); >+} >+ >+onmessage = e => handler(e, postMessage); >+ >+onconnect = e => { >+ let port = e.ports[0]; >+ port.onmessage = e => handler(e, msg => port.postMessage(msg)); >+}; >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt >new file mode 100644 >index 00000000000..1231fb09deb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+FAIL Creating BroadcastChannel in an opaque origin assert_equals: expected "Created" but got "Exception: ReferenceError" >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox.html >new file mode 100644 >index 00000000000..aedf3c0d6fe >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox.html >@@ -0,0 +1,16 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<title>Creating BroadcastChannel in an opaque origin</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<body> >+<script> >+async_test(t => { >+ self.onmessage = t.step_func(e => { >+ assert_equals(e.data, 'Created'); >+ t.done(); >+ }); >+ }); >+</script> >+<iframe sandbox="allow-scripts" src="resources/sandboxed.html"></iframe> >+</body> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/w3c-import.log >new file mode 100644 >index 00000000000..38d9552282b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/w3c-import.log >@@ -0,0 +1,22 @@ >+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/webmessaging/broadcastchannel/basics.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/origin.window.js >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/sandbox.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html >new file mode 100644 >index 00000000000..1d05feb7edb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/workers.html >@@ -0,0 +1,141 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+ >+async_test(t => { >+ let c1 = new BroadcastChannel('worker'); >+ let c2 = new BroadcastChannel('worker'); >+ let events = []; >+ >+ c1.onmessage = e => events.push(e); >+ c2.onmessage = e => events.push(e); >+ >+ let doneCount = 0; >+ c2.addEventListener('message', t.step_func(e => { >+ if (e.data == 'from worker') { >+ c2.postMessage('from c2'); >+ c1.postMessage('done'); >+ } else if (e.data == 'done') { >+ assert_equals(events.length, 4); >+ assert_equals(events[0].data, 'from worker'); >+ assert_equals(events[0].target, c1); >+ assert_equals(events[1].data, 'from worker'); >+ assert_equals(events[1].target, c2); >+ assert_equals(events[2].data, 'from c2'); >+ assert_equals(events[3].data, 'done'); >+ if (++doneCount == 2) t.done(); >+ } >+ })); >+ >+ let worker = new Worker('resources/worker.js'); >+ worker.onmessage = t.step_func(e => { >+ assert_array_equals(e.data, ['from c2', 'done']); >+ if (++doneCount == 2) t.done(); >+ }); >+ worker.postMessage({channel: 'worker'}); >+ >+ }, 'BroadcastChannel works in workers'); >+ >+async_test(t => { >+ let c1 = new BroadcastChannel('shared worker'); >+ let c2 = new BroadcastChannel('shared worker'); >+ let events = []; >+ >+ c1.onmessage = e => events.push(e); >+ c2.onmessage = e => events.push(e); >+ >+ let doneCount = 0; >+ c2.addEventListener('message', t.step_func(e => { >+ if (e.data == 'from worker') { >+ c2.postMessage('from c2'); >+ c1.postMessage('done'); >+ } else if (e.data == 'done') { >+ assert_equals(events.length, 4); >+ assert_equals(events[0].data, 'from worker'); >+ assert_equals(events[0].target, c1); >+ assert_equals(events[1].data, 'from worker'); >+ assert_equals(events[1].target, c2); >+ assert_equals(events[2].data, 'from c2'); >+ assert_equals(events[3].data, 'done'); >+ if (++doneCount == 2) t.done(); >+ } >+ })); >+ >+ let worker = new SharedWorker('resources/worker.js'); >+ worker.port.onmessage = t.step_func(e => { >+ assert_array_equals(e.data, ['from c2', 'done']); >+ if (++doneCount == 2) t.done(); >+ }); >+ worker.port.postMessage({channel: 'shared worker'}); >+ >+ }, 'BroadcastChannel works in shared workers'); >+ >+async_test(t => { >+ let c = new BroadcastChannel('worker-close'); >+ let events = []; >+ >+ c.onmessage = e => events.push('c1: ' + e.data); >+ >+ let worker = new Worker('resources/worker.js'); >+ worker.onmessage = t.step_func(e => { >+ assert_array_equals(events, ['c1: from worker', 'c2: echo'], >+ 'messages in document'); >+ assert_array_equals(e.data, ['done'], 'messages in worker'); >+ t.done(); >+ }); >+ >+ c.addEventListener('message', e => { >+ if (e.data == 'from worker') { >+ c.close(); >+ if (self.gc) self.gc(); >+ window.setTimeout(() => { >+ let c2 = new BroadcastChannel('worker-close'); >+ c2.onmessage = e => { >+ events.push('c2: ' + e.data); >+ c2.postMessage('done'); >+ }; >+ worker.postMessage({ping: 'echo'}); >+ }, 1); >+ } >+ }); >+ >+ worker.postMessage({channel: 'worker-close'}); >+ >+ }, 'Closing and re-opening a channel works.'); >+ >+async_test(t => { >+ function workerCode() { >+ close(); >+ var bc = new BroadcastChannel('worker-test'); >+ postMessage(true); >+ } >+ >+ var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); >+ >+ var w = new Worker(URL.createObjectURL(workerBlob)); >+ w.onmessage = function(e) { >+ assert_true(e.data, "BroadcastChannel created on worker shutdown."); >+ t.done(); >+ } >+}, 'BroadcastChannel created after a worker self.close()'); >+ >+async_test(t => { >+ function workerCode() { >+ close(); >+ var bc = new BroadcastChannel('worker-test-after-close'); >+ bc.postMessage(true); >+ } >+ >+ var bc = new BroadcastChannel('worker-test-after-close'); >+ bc.onmessage = function(e) { >+ assert_true(e.data, "BroadcastChannel created on worker shutdown."); >+ t.done(); >+ } >+ >+ var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); >+ new Worker(URL.createObjectURL(workerBlob)); >+}, 'BroadcastChannel used after a worker self.close()'); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm >new file mode 100644 >index 00000000000..97584c4a390 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm >@@ -0,0 +1,58 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> event.data returns the data of the message </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: event.data returns the data of the message."; >+ >+ var t = async_test(description); >+ >+ var PORT = location.port !== "" ? ":" + location.port : ""; >+ var DATA = "STRING"; >+ var TYPE = "string"; >+ var TARGET1 = document.querySelectorAll("iframe")[0]; >+ var TARGET2 = document.querySelectorAll("iframe")[1]; >+ var XORIGIN = "{{location[scheme]}}://{{domains[www]}}" + PORT; >+ var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT; >+ var ExpectedResult = [DATA, TYPE, DATA, TYPE]; >+ var ActualResult = []; >+ var loaded = 0; >+ >+ function PostMessageTest() >+ { >+ loaded++; >+ >+ if (loaded == 2) >+ { >+ TARGET1.contentWindow.postMessage(DATA, XORIGIN); >+ TARGET2.contentWindow.postMessage(DATA, SORIGIN); >+ } >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ if (e.data.toString() === "STRING") { >+ ActualResult.push(e.data, typeof(e.data)); >+ >+ if (ActualResult.length >= ExpectedResult.length) { >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ } >+ } >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.origin.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.origin.sub.htm >new file mode 100644 >index 00000000000..5b1ab3e3c37 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.origin.sub.htm >@@ -0,0 +1,66 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> event.origin returns the origin of the message </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[天æ°ã®è¯ãæ¥]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: event.origin returns the origin of the message."; >+ >+ var t = async_test(description); >+ >+ var PORT = location.port !== "" ? ":" + location.port : ""; >+ var TARGET1 = document.querySelectorAll("iframe")[0]; >+ var TARGET2 = document.querySelectorAll("iframe")[1]; >+ var XORIGIN = "{{location[scheme]}}://{{domains[天æ°ã®è¯ãæ¥]}}" + PORT; >+ var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT; >+ var ExpectedResult = ["#1", XORIGIN, "#2", SORIGIN]; >+ var ActualResult = []; >+ var loaded = 0; >+ >+ function PostMessageTest() >+ { >+ loaded++; >+ >+ if (loaded == 2) >+ { >+ TARGET1.contentWindow.postMessage("#1", XORIGIN); >+ TARGET2.contentWindow.postMessage("#2", SORIGIN); >+ } >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ // Messages from TARGET1 and TARGET2 can come in any order >+ // (since one of them is cross-origin and can run in parallel). >+ // To make the tests immune to message reordering, always >+ // put the response from TARGET1 at the start of the list. >+ if (e.data.toString() === "#1") >+ { >+ ActualResult = [e.data, e.origin].concat(ActualResult); >+ } >+ else if (e.data.toString() === "#2") >+ { >+ ActualResult = ActualResult.concat([e.data, e.origin]); >+ } >+ >+ if (ActualResult.length >= ExpectedResult.length) >+ { >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ } >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.ports.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.ports.sub.htm >new file mode 100644 >index 00000000000..a4ca24b15ee >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.ports.sub.htm >@@ -0,0 +1,49 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> event.ports returns the MessagePort array sent with the message </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: event.ports returns the MessagePort array sent with the message."; >+ >+ var t = async_test(description); >+ >+ var DATA = {test: "e.source.postMessage(e.ports.toString(), '*', e.ports)"}; >+ var TARGET = document.querySelector("iframe"); >+ var ExpectedResult = ""; >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_own_property(window, "MessageChannel", "window"); >+ >+ var channel = new MessageChannel(); >+ var ports = [channel.port1, channel.port2]; >+ ExpectedResult = ports.toString(); >+ TARGET.contentWindow.postMessage(DATA, "*", ports); >+ >+ }, "MessageChannel is supported."); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ assert_equals(e.data, ExpectedResult, "e.data"); >+ assert_true(e.ports[0] instanceof MessagePort, e.ports[0] + " instanceof MessageChannel"); >+ assert_true(e.ports[1] instanceof MessagePort, e.ports[1] + " instanceof MessageChannel"); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.htm >new file mode 100644 >index 00000000000..e270d7def04 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.htm >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Same-origin: event.source returns the WindowProxy of the source window </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: Same-origin: event.source returns the WindowProxy of the source window."; >+ >+ var t = async_test(description); >+ >+ var DATA = "foo"; >+ var TARGET = document.querySelector("iframe"); >+ var SORIGIN = location.protocol + "//" + location.host; >+ var ExpectedResult = [SORIGIN, "AccessCookieAllowed"]; >+ var ActualResult = []; >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage(DATA, SORIGIN); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ try >+ { >+ var sdomainCookie = e.source.document.cookie; >+ ActualResult.push(e.origin, "AccessCookieAllowed"); >+ } >+ catch(ex) >+ { >+ ActualResult.push(e.origin, "AccessCookieDenied"); >+ } >+ >+ assert_true(e.source === TARGET.contentWindow); >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.xorigin.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.xorigin.sub.htm >new file mode 100644 >index 00000000000..6190c9624e7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.xorigin.sub.htm >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Corss-origin: event.source returns the WindowProxy of the source window </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ var description = "Test Description: Cross-origin: event.source returns the WindowProxy of the source window."; >+ >+ var t = async_test(description); >+ >+ var PORT = location.port !== "" ? ":" + location.port : ""; >+ var DATA = "foo"; >+ var TARGET = document.querySelector("iframe"); >+ var XORIGIN = "{{location[scheme]}}://{{domains[www1]}}" + PORT; >+ var ExpectedResult = [XORIGIN, "AccessCookieDenied"]; >+ var ActualResult = []; >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage(DATA, XORIGIN); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ try >+ { >+ var sdomainCookie = e.source.document.cookie; >+ ActualResult.push(e.origin, "AccessCookieAllowed"); >+ } >+ catch(ex) >+ { >+ ActualResult.push(e.origin, "AccessCookieDenied"); >+ } >+ >+ assert_true(e.source.parent === window); >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001-expected.txt >new file mode 100644 >index 00000000000..e1dc80749bc >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS basic messagechannel test >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001.html >new file mode 100644 >index 00000000000..12fac8229c6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/001.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<title>basic messagechannel test</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ channel.port1.postMessage(1); >+ channel.port2.onmessage = t.step_func( >+ function(e) { >+ assert_equals(e.data, 1); >+ t.done(); >+ }); >+ channel.port2.start(); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002-expected.txt >new file mode 100644 >index 00000000000..bf31534a2b7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS without start() >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002.html >new file mode 100644 >index 00000000000..8b712671893 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>without start()</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ channel.port1.postMessage(1); >+ var i = 0; >+ channel.port2.addEventListener('message', function() { i++; }, false); >+ setTimeout(t.step_func(function() { assert_equals(i, 0); t.done();}), 50); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003-expected.txt >new file mode 100644 >index 00000000000..9fb61dec411 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS onmessage implied start() >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003.html >new file mode 100644 >index 00000000000..7addaeb0faf >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003.html >@@ -0,0 +1,19 @@ >+<!doctype html> >+<title>onmessage implied start()</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ channel.port1.postMessage(1); >+ channel.port2.onmessage = function() { >+ setTimeout(t.step_func(function() { >+ t.done(); >+ }), 50); >+ channel.port2.onmessage = t.step_func(function() { >+ assert_unreached(); >+ }); >+ }; // implies start() >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-1.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-1.html >new file mode 100644 >index 00000000000..b5dd282cdca >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-1.html >@@ -0,0 +1,8 @@ >+<!doctype html> >+<title>004-1</title> >+<script> >+onmessage = function(e) { >+ var port = e.ports[0]; >+ port.postMessage(e.data); >+} >+</script> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-2.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-2.html >new file mode 100644 >index 00000000000..1b8ef0a7a0f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-2.html >@@ -0,0 +1,10 @@ >+<!doctype html> >+<title>004-2</title> >+<script> >+onmessage = function(e) { >+ var port = e.ports[0]; >+ port.onmessage = function(e) { // implied start() >+ parent.postMessage(e.data, '*'); >+ } >+} >+</script> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-expected.txt >new file mode 100644 >index 00000000000..c05bb4034d1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS cross-document channel >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004.html >new file mode 100644 >index 00000000000..19921fef85b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004.html >@@ -0,0 +1,22 @@ >+<!doctype html> >+<title>cross-document channel</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src=004-1.html></iframe><iframe src=004-2.html></iframe> >+<div id="log"></div> >+<script> >+var t = async_test(); >+onload = t.step_func( >+ function() { >+ var channel = new MessageChannel(); >+ window[0].postMessage(1, '*', [channel.port1]); >+ window[1].postMessage(2, '*', [channel.port2]); >+ channel = null; >+ window.onmessage = t.step_func( >+ function(e) { >+ assert_equals(e.data, 1); >+ t.done(); >+ }); >+ } >+); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt >new file mode 100644 >index 00000000000..c3e60ba9c0d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt >@@ -0,0 +1,8 @@ >+ >+PASS Message sent to closed port should not arrive. >+PASS Message sent from closed port should not arrive. >+PASS Message sent to closed port from transferred port should not arrive. >+PASS Inflight messages should be delivered even when sending port is closed afterwards. >+PASS Close in onmessage should not cancel inflight messages. >+FAIL close() detaches a MessagePort (but not the one its entangled with) assert_throws: function "() => self.postMessage(null, "*", [c.port1])" did not throw >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html >new file mode 100644 >index 00000000000..d975ea72832 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html >@@ -0,0 +1,68 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/comms.html#dom-messageport-close"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+// How long (in ms) these tests should wait before deciding no further messages >+// will be received. >+const time_to_wait_for_messages = 100; >+ >+async_test(t => { >+ const c = new MessageChannel(); >+ c.port1.onmessage = t.unreached_func('Should not have delivered message'); >+ c.port1.close(); >+ c.port2.postMessage('TEST'); >+ setTimeout(t.step_func_done(), time_to_wait_for_messages); >+ }, 'Message sent to closed port should not arrive.'); >+ >+async_test(t => { >+ const c = new MessageChannel(); >+ c.port1.onmessage = t.unreached_func('Should not have delivered message'); >+ c.port2.close(); >+ c.port2.postMessage('TEST'); >+ setTimeout(t.step_func_done(), time_to_wait_for_messages); >+ }, 'Message sent from closed port should not arrive.'); >+ >+async_test(t => { >+ const c = new MessageChannel(); >+ c.port1.onmessage = t.unreached_func('Should not have delivered message'); >+ c.port1.close(); >+ const c2 = new MessageChannel(); >+ c2.port1.onmessage = t.step_func(e => { >+ e.ports[0].postMessage('TESTMSG'); >+ setTimeout(t.step_func_done(), time_to_wait_for_messages); >+ }); >+ c2.port2.postMessage('TEST', [c.port2]); >+ }, 'Message sent to closed port from transferred port should not arrive.'); >+ >+async_test(t => { >+ const c = new MessageChannel(); >+ let isClosed = false; >+ c.port1.onmessage = t.step_func_done(e => { >+ assert_true(isClosed); >+ assert_equals(e.data, 'TEST'); >+ }); >+ c.port2.postMessage('TEST'); >+ c.port2.close(); >+ isClosed = true; >+ }, 'Inflight messages should be delivered even when sending port is closed afterwards.'); >+ >+async_test(t => { >+ const c = new MessageChannel(); >+ c.port1.onmessage = t.step_func_done(e => { >+ if (e.data == 'DONE') t.done(); >+ assert_equals(e.data, 'TEST'); >+ c.port1.close(); >+ }); >+ c.port2.postMessage('TEST'); >+ c.port2.postMessage('DONE'); >+ }, 'Close in onmessage should not cancel inflight messages.'); >+ >+test(() => { >+ const c = new MessageChannel(); >+ c.port1.close(); >+ assert_throws("DataCloneError", () => self.postMessage(null, "*", [c.port1])); >+ self.postMessage(null, "*", [c.port2]); >+}, "close() detaches a MessagePort (but not the one its entangled with)"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/w3c-import.log >new file mode 100644 >index 00000000000..a2ae7126420 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/w3c-import.log >@@ -0,0 +1,24 @@ >+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/webmessaging/message-channels/001.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/002.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/003.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-1.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004-2.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/004.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker-expected.txt >new file mode 100644 >index 00000000000..5f25d5cf22b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS MessageChannel/MessagePort created and used after a worker self.close() >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker.html >new file mode 100644 >index 00000000000..0502021fff1 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker.html >@@ -0,0 +1,26 @@ >+<!DOCTYPE html> >+<meta charset=utf-8> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/comms.html#messageevent"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script> >+ >+async_test(t => { >+ function workerCode() { >+ close(); >+ var mc = new MessageChannel(); >+ mc.port1.postMessage(42); >+ mc.port2.postMessage(42); >+ postMessage(true); >+ } >+ >+ var workerBlob = new Blob([workerCode.toString() + ";workerCode();"], {type:"application/javascript"}); >+ >+ var w = new Worker(URL.createObjectURL(workerBlob)); >+ w.onmessage = function(e) { >+ assert_true(e.data, "MessageChannel created on worker shutdown."); >+ t.done(); >+ } >+}, 'MessageChannel/MessagePort created and used after a worker self.close()'); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror-expected.txt >new file mode 100644 >index 00000000000..e0698475a80 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror-expected.txt >@@ -0,0 +1,5 @@ >+ >+FAIL The default value of onmessageerror is null assert_equals: body expected (object) null but got (undefined) undefined >+FAIL The onmessageerror content attribute must be compiled into the onmessageerror property assert_equals: The onmessageerror property must be a function expected "function" but got "undefined" >+FAIL The onmessageerror content attribute must execute when an event is dispatched on the window assert_true: Dispatching the event must run the code expected true got false >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror.html >new file mode 100644 >index 00000000000..2cb51ee3c06 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror.html >@@ -0,0 +1,44 @@ >+<!DOCTYPE html> >+<title>onmessageerror content attribute</title> >+<link rel="author" title="Domenic Denicola" href="mailto:d@domenic.me"> >+<link rel="help" href="https://html.spec.whatwg.org/multipage/#handler-onmessageerror"> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+ >+<body> >+ >+<script> >+"use strict"; >+window.messageErrorHappened = false; >+ >+function cleanup() { >+ window.messageErrorHappened = false; >+ document.body.removeAttribute("onmessageerror"); >+} >+ >+test(() => { >+ assert_equals(document.body.onmessageerror, null, "body"); >+ assert_equals(window.onmessageerror, null, "window"); >+}, "The default value of onmessageerror is null"); >+ >+test(t => { >+ t.add_cleanup(cleanup); >+ >+ document.body.setAttribute("onmessageerror", "window.messageErrorHappened = true;") >+ const compiledHandler = document.body.onmessageerror; >+ >+ assert_equals(typeof compiledHandler, "function", "The onmessageerror property must be a function"); >+ compiledHandler(); >+ assert_true(window.messageErrorHappened, "Calling the handler must run the code"); >+}, "The onmessageerror content attribute must be compiled into the onmessageerror property"); >+ >+test(t => { >+ t.add_cleanup(cleanup); >+ >+ document.body.setAttribute("onmessageerror", "window.messageErrorHappened = true;") >+ >+ window.dispatchEvent(new Event("messageerror")); >+ >+ assert_true(window.messageErrorHappened, "Dispatching the event must run the code"); >+}, "The onmessageerror content attribute must execute when an event is dispatched on the window"); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm >new file mode 100644 >index 00000000000..457cf94fa56 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm >@@ -0,0 +1,44 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with ArrayBuffer object </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: postMessage with ArrayBuffer object."; >+ >+ var t = async_test(description); >+ >+ var DATA; >+ var TYPE = "object"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ DATA = new ArrayBuffer(32); >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ }, "ArrayBuffer is supported."); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ assert_equals(typeof(e.data), TYPE); >+ assert_equals(e.data.toString(), DATA.toString()); >+ assert_equals(e.data.byteLength, 32); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Date.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Date.sub.htm >new file mode 100644 >index 00000000000..0f89738f3ad >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Date.sub.htm >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with Date object </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: Messages can contain JavaScript values (e.g., Dates)."; >+ >+ var t = async_test(description); >+ >+ var DATA = new Date(); >+ var TYPE = "object"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ assert_equals(typeof(e.data), TYPE); >+ assert_equals(e.data.valueOf(), DATA.valueOf()); >+ assert_not_equals(e.data, DATA, "Object is cloned"); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document-expected.txt >new file mode 100644 >index 00000000000..843319164b6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: postMessage with Document object: Throw a DataCloneError if message could not be cloned. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm >new file mode 100644 >index 00000000000..97765fae818 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with Document object </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "postMessage with Document object: Throw a DataCloneError if message could not be cloned."; >+ >+ var DATA = document; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_throws("DATA_CLONE_ERR", function() >+ { >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ }); >+ }, description); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function-expected.txt >new file mode 100644 >index 00000000000..808081a3da8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: postMessage with Function object: Throw a DataCloneError if message could not be cloned. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm >new file mode 100644 >index 00000000000..c53e8fcc3cd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm >@@ -0,0 +1,36 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with Function object </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "postMessage with Function object: Throw a DataCloneError if message could not be cloned."; >+ >+ var DATA = new Function(); >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_throws("DATA_CLONE_ERR", function() >+ { >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ }); >+ }, description); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm >new file mode 100644 >index 00000000000..6526e972c48 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm >@@ -0,0 +1,76 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage to same-origin iframe with MessagePort array [100 ports] </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: postMessage to same-origin iframe with MessagePort array containing 100 ports."; >+ >+ var t = async_test(description); >+ >+ var TOTALPORTS = 100; >+ var LocalPorts = []; >+ var RemotePorts = []; >+ var PassedResult = 0; >+ var sum = 0; >+ var TARGET = document.querySelector("iframe").contentWindow; >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_own_property(window, "MessageChannel", "window"); >+ >+ var channels = []; >+ >+ for (var i=0; i<TOTALPORTS; i++) >+ { >+ channels[i] = new MessageChannel(); >+ LocalPorts[i] = channels[i].port1; >+ LocalPorts[i].foo = i; >+ RemotePorts[i] = channels[i].port2; >+ >+ LocalPorts[i].onmessage = t.step_func(function(e) >+ { >+ assert_equals(e.target.foo, e.data); >+ >+ PassedResult++; >+ sum += e.data; >+ >+ if (PassedResult == TOTALPORTS) >+ { >+ assert_equals(sum, 4950); >+ t.done(); >+ } >+ }); >+ } >+ >+ TARGET.postMessage("ports", "*", RemotePorts); >+ >+ }, "MessageChannel is supported."); >+ } >+ >+ window.onmessage = function(e) >+ { >+ if (e.data === "ports") >+ { >+ for (var i=0; i<TOTALPORTS; i++) >+ { >+ LocalPorts[i].postMessage(LocalPorts[i].foo); >+ } >+ } >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm >new file mode 100644 >index 00000000000..cf2b8eb4c11 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm >@@ -0,0 +1,76 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage to cross-origin iframe with MessagePort array [100 ports] </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: postMessage to cross-origin iframe with MessagePort array containing 100 ports."; >+ >+ var t = async_test(description); >+ >+ var TOTALPORTS = 100; >+ var LocalPorts = []; >+ var RemotePorts = []; >+ var PassedResult = 0; >+ var sum = 0; >+ var TARGET = document.querySelector("iframe").contentWindow; >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_own_property(window, "MessageChannel", "window"); >+ >+ var channels = []; >+ >+ for (var i=0; i<TOTALPORTS; i++) >+ { >+ channels[i] = new MessageChannel(); >+ LocalPorts[i] = channels[i].port1; >+ LocalPorts[i].foo = i; >+ RemotePorts[i] = channels[i].port2; >+ >+ LocalPorts[i].onmessage = t.step_func(function(e) >+ { >+ assert_equals(e.target.foo, e.data); >+ >+ PassedResult++; >+ sum += e.data; >+ >+ if (PassedResult == TOTALPORTS) >+ { >+ assert_equals(sum, 4950); >+ t.done(); >+ } >+ }); >+ } >+ >+ TARGET.postMessage("ports", "*", RemotePorts); >+ >+ }, "MessageChannel is supported."); >+ } >+ >+ window.onmessage = function(e) >+ { >+ if (e.data === "ports") >+ { >+ for (var i=0; i<TOTALPORTS; i++) >+ { >+ LocalPorts[i].postMessage(LocalPorts[i].foo); >+ } >+ } >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm >new file mode 100644 >index 00000000000..41e4a75eda6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm >@@ -0,0 +1,39 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with arrays </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: Messages can be structured objects, e.g., arrays."; >+ >+ var t = async_test(description); >+ >+ var DATA = [1,2,3,4,5,6,7,8]; >+ var TYPE = "object"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ assert_equals(typeof(e.data), TYPE); >+ assert_array_equals(e.data, DATA); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm >new file mode 100644 >index 00000000000..532f28251cb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm >@@ -0,0 +1,66 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Cross-origin postMessage with targetOrigin == "*" </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: To send the message to the target regardless of origin, set the target origin to '*'."; >+ >+ var t = async_test(description); >+ >+ var PORT = location.port !== "" ? ":" + location.port : ""; >+ var TARGET1 = document.querySelectorAll("iframe")[0]; >+ var TARGET2 = document.querySelectorAll("iframe")[1]; >+ var XORIGIN = "{{location[scheme]}}://{{domains[www]}}" + PORT; >+ var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT; >+ var ExpectedResult = ["#1", XORIGIN, "#2", SORIGIN]; >+ var ActualResult = []; >+ var loaded = 0; >+ >+ function PostMessageTest() >+ { >+ loaded++; >+ >+ if (loaded == 2) >+ { >+ TARGET1.contentWindow.postMessage("#1", "*"); >+ TARGET2.contentWindow.postMessage("#2", "*"); >+ } >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ // Messages from TARGET1 and TARGET2 can come in any order >+ // (since one of them is cross-origin and can run in parallel). >+ // To make the tests immune to message reordering, always >+ // put the response from TARGET1 at the start of the list. >+ if (e.data.toString() === "#1") >+ { >+ ActualResult = [e.data, e.origin].concat(ActualResult); >+ } >+ else if (e.data.toString() === "#2") >+ { >+ ActualResult = ActualResult.concat([e.data, e.origin]); >+ } >+ >+ if (ActualResult.length >= ExpectedResult.length) >+ { >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ } >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects-expected.txt >new file mode 100644 >index 00000000000..40deb1e891d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: postMessage with duplicate transfer objects raises DataCloneError exception. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm >new file mode 100644 >index 00000000000..a28c9640067 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with duplicate transfer objects raises DataCloneError exception </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "postMessage with duplicate transfer objects raises DataCloneError exception."; >+ >+ var DATA = "ports"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_throws("DATA_CLONE_ERR", function() >+ { >+ assert_own_property(window, "MessageChannel", "window"); >+ var channel = new MessageChannel(); >+ TARGET.contentWindow.postMessage(DATA, "*", [channel.port1, channel.port1]); >+ }); >+ }, description); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin-expected.txt >new file mode 100644 >index 00000000000..1186985fefe >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Test Description: If the value of the targetOrigin argument is neither a single U+002A ASTERISK character (*), a single U+002F SOLIDUS character (/), nor an absolute URL, then throw a SyntaxError exception and abort the overall set of steps. >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm >new file mode 100644 >index 00000000000..d6e16460f19 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm >@@ -0,0 +1,38 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with invalid targetOrigin raises SyntaxError exception </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "If the value of the targetOrigin argument is neither a single U+002A ASTERISK character (*), " + >+ "a single U+002F SOLIDUS character (/), nor an absolute URL, then throw a SyntaxError exception " + >+ "and abort the overall set of steps."; >+ >+ var DATA = "InvalidOrigin"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ test(function() >+ { >+ assert_throws("SYNTAX_ERR", function() >+ { >+ TARGET.contentWindow.postMessage(DATA, DATA); >+ }); >+ }, description); >+ } >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm >new file mode 100644 >index 00000000000..dab207188af >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm >@@ -0,0 +1,40 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> postMessage with nested objects </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: Messages can be structured objects, e.g., nested objects."; >+ >+ var t = async_test(description); >+ >+ var DATA = {foo: {bar: "wow"}}; >+ var TYPE = "object"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ assert_equals(typeof(e.data), TYPE); >+ assert_equals(typeof(e.data.foo), TYPE); >+ assert_object_equals(e.data, DATA); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm >new file mode 100644 >index 00000000000..6c8ac8353a7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Same-origin: Origin of the target window doesn't match the given origin </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "Same-origin: If the origin of the target window doesn't match the given origin, " + >+ "the message is discarded."; >+ >+ var t = async_test(description); >+ >+ var PORT = location.port !== "" ? ":" + location.port : ""; >+ var TARGET = document.querySelector("iframe"); >+ var XORIGIN = "{{location[scheme]}}://{{domains[www1]}}" + PORT; >+ var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT; >+ var ExpectedResult = ["#0", SORIGIN, "#3", SORIGIN]; >+ var ActualResult = []; >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage("#0", SORIGIN); >+ TARGET.contentWindow.postMessage("#1", "http://www.invalid-domain.com"); >+ TARGET.contentWindow.postMessage("#2", XORIGIN); >+ TARGET.contentWindow.postMessage("#3", "*"); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ ActualResult.push(e.data, e.origin); >+ >+ if (ActualResult.length >= ExpectedResult.length) >+ { >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ } >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm >new file mode 100644 >index 00000000000..d8e38e2919f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm >@@ -0,0 +1,51 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Cross-origin: Origin of the target window doesn't match the given origin </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "Cross-origin: If the origin of the target window doesn't match the given origin, " + >+ "the message is discarded."; >+ >+ var t = async_test(description); >+ >+ var PORT = location.port !== "" ? ":" + location.port : ""; >+ var TARGET = document.querySelector("iframe"); >+ var XORIGIN = "{{location[scheme]}}://{{domains[www1]}}" + PORT; >+ var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT; >+ var ExpectedResult = ["#0", XORIGIN, "#3", XORIGIN]; >+ var ActualResult = []; >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage("#0", XORIGIN); >+ TARGET.contentWindow.postMessage("#1", "http://www.invalid-domain.com"); >+ TARGET.contentWindow.postMessage("#2", SORIGIN); >+ TARGET.contentWindow.postMessage("#3", "*"); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ ActualResult.push(e.data, e.origin); >+ >+ if (ActualResult.length >= ExpectedResult.length) >+ { >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ } >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm >new file mode 100644 >index 00000000000..92f5afb7985 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm >@@ -0,0 +1,43 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Same-origin postMessage with targetOrigin == "/" </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="./support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "To restrict the message to same-origin targets only, without needing to explicitly " + >+ "state the origin, set the target origin to '/'."; >+ >+ var t = async_test(description); >+ >+ var DATA = "/"; >+ var TARGET = document.querySelector("iframe"); >+ var SORIGIN = location.protocol + "//" + location.host; >+ var ExpectedResult = [DATA, SORIGIN]; >+ var ActualResult = []; >+ >+ function PostMessageTest() >+ { >+ TARGET.contentWindow.postMessage(DATA, "/"); >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ ActualResult.push(e.data, e.origin); >+ assert_array_equals(ActualResult, ExpectedResult, "ActualResult"); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm >new file mode 100644 >index 00000000000..eebc85432fe >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm >@@ -0,0 +1,48 @@ >+<!DOCTYPE html> >+<html> >+<head> >+<title> Cross-origin postMessage with targetOrigin == "/" </title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+</head> >+<body> >+<div id=log></div> >+ >+<div style="display:none"> >+ <iframe width="70%" onload="PostMessageTest()" src="{{location[scheme]}}://{{domains[www1]}}:{{location[port]}}/webmessaging/support/ChildWindowPostMessage.htm"></iframe> >+</div> >+ >+<script> >+ >+ >+ var description = "Test Description: " + >+ "If the targetOrigin argument is a single literal U+002F SOLIDUS character (/), and " + >+ "the Document of the Window object on which the method was invoked does not have the " + >+ "same origin as the entry script's document, then abort these steps silently."; >+ >+ var t = async_test(description); >+ >+ var DATA = "NoExceptionRaised"; >+ var TARGET = document.querySelector("iframe"); >+ >+ function PostMessageTest() >+ { >+ try >+ { >+ TARGET.contentWindow.postMessage("/", "/"); >+ TARGET.contentWindow.postMessage(DATA, "*"); >+ } >+ catch(ex) >+ { >+ TARGET.contentWindow.postMessage("ExceptionRaised", "*"); >+ } >+ } >+ >+ window.onmessage = t.step_func(function(e) >+ { >+ assert_equals(e.data, DATA, "e.data"); >+ t.done(); >+ }); >+</script> >+</body> >+</html> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/w3c-import.log >new file mode 100644 >index 00000000000..9b0f8f1c370 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/w3c-import.log >@@ -0,0 +1,54 @@ >+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/webmessaging/Channel_postMessage_Blob.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/META.yml >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-worker.js >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_onmessage_postMessage_infinite_loop.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent_properties.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/README.md >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Transferred_objects_unusable.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.origin.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.ports.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.source.xorigin.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/messageerror.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Date.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_sorigin.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_MessagePorts_xorigin.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_origin_mismatch_xorigin.sub.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_sorigin.htm >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_solidus_xorigin.sub.htm >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001-expected.txt >new file mode 100644 >index 00000000000..4791191bc7a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving broken url >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html >new file mode 100644 >index 00000000000..e3687f16226 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html >@@ -0,0 +1,12 @@ >+<!doctype html> >+<title>resolving broken url</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+test(function() { >+ assert_throws('SYNTAX_ERR', function() { >+ postMessage('', 'http://foo bar', []); >+ }, 'should have failed to resolve'); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002-expected.txt >new file mode 100644 >index 00000000000..54fc888bbd4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving url with stuff in host-specific >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002.html >new file mode 100644 >index 00000000000..f7d085937cd >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>resolving url with stuff in host-specific</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', location.protocol + '//' + location.host + '//', []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003-expected.txt >new file mode 100644 >index 00000000000..e9a59367c64 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving 'example.org' >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html >new file mode 100644 >index 00000000000..3c0d4296b07 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html >@@ -0,0 +1,12 @@ >+<!doctype html> >+<title>resolving 'example.org'</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+test(function() { >+ assert_throws('SYNTAX_ERR', function() { >+ postMessage('', 'example.org', []); >+ }, 'targetOrigin is not an absolute url'); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004-expected.txt >new file mode 100644 >index 00000000000..2f447aada4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS special value '/' >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004.html >new file mode 100644 >index 00000000000..d129ad119a8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>special value '/'</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', '/', []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005-expected.txt >new file mode 100644 >index 00000000000..7acb2318517 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving a same origin targetOrigin >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005.html >new file mode 100644 >index 00000000000..e8039689198 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>resolving a same origin targetOrigin</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', location.protocol + '//' + location.host, []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006-expected.txt >new file mode 100644 >index 00000000000..e83eead997d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving a same origin targetOrigin with trailing slash >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006.html >new file mode 100644 >index 00000000000..4e3f1ede841 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>resolving a same origin targetOrigin with trailing slash</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', location.protocol + '//' + location.host + '/', []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007-expected.txt >new file mode 100644 >index 00000000000..5f7931f1f96 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS targetOrigin '*' >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007.html >new file mode 100644 >index 00000000000..c049a1337d3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>targetOrigin '*'</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', '*', []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010-expected.txt >new file mode 100644 >index 00000000000..f3ce6455691 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010-expected.txt >@@ -0,0 +1,17 @@ >+ >+PASS undefined >+PASS null >+PASS false >+PASS true >+PASS 1 >+PASS NaN >+PASS Infinity >+PASS string >+FAIL date Can't find variable: sameDate >+PASS regex >+PASS self >+FAIL array Can't find variable: assert_array_equals_ >+FAIL object Can't find variable: assert_object_equals_ >+PASS error >+PASS unreached >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010.html >new file mode 100644 >index 00000000000..05080e3f7ae >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010.html >@@ -0,0 +1,113 @@ >+<!doctype html> >+<title>message clone</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script src="../support/compare.js"></script> >+<div id=log></div> >+<script> >+ var err = new Error('foo'); >+ var date = new Date(); >+ >+ var test_array = [ undefined, >+ null, >+ false, >+ true, >+ 1, >+ NaN, >+ Infinity, >+ 'foo', >+ date, >+ /foo/, >+ null/*self*/, >+ null/*err*/]; >+ >+ var cloned_array = [ undefined, >+ null, >+ false, >+ true, >+ 1, >+ NaN, >+ Infinity, >+ 'foo', >+ date, >+ /foo/, >+ null/*self*/, >+ null/*err*/]; >+ >+ var test_object = {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*/}; >+ >+ var cloned_object = {a:undefined, b:null, c:false, d:true, e:1, f:NaN, g:Infinity, h:'foo', i: date, j: /foo/, k:null, l: [], m: {}, n:null}; >+ >+ var tests = [undefined, null, >+ false, true, >+ 1, NaN, Infinity, >+ 'foo', >+ date, >+ /foo/, >+ /* ImageData, File, FileData, FileList, */ >+ null /*self*/, >+ test_array, >+ test_object, >+ null /*err*/]; >+ >+ for (var i = 0; i < tests.length; ++i) { >+ postMessage(tests[i], '*', []); >+ } >+ >+ var test_undefined = async_test('undefined'); >+ var test_null = async_test('null'); >+ var test_false = async_test('false'); >+ var test_true = async_test('true'); >+ var test_1 = async_test('1'); >+ var test_NaN = async_test('NaN'); >+ var test_Infinity = async_test('Infinity'); >+ var test_string = async_test('string'); >+ var test_date = async_test('date'); >+ var test_regex = async_test('regex'); >+ var test_self = async_test('self'); >+ var test_array = async_test('array'); >+ var test_object = async_test('object'); >+ var test_error = async_test('error'); >+ var test_unreached = async_test('unreached'); >+ >+ var j = 0; >+ onmessage = function(e) { >+ switch (j) { >+ case 0: test_undefined.step(function() { assert_equals(e.data, undefined); this.done(); }); break; >+ case 1: test_null.step(function() { assert_equals(e.data, null); this.done(); }); break; >+ case 2: test_false.step(function() { assert_false(e.data); this.done(); }); break; >+ case 3: test_true.step(function() { assert_true(e.data); this.done(); }); break; >+ case 4: test_1.step(function() { assert_equals(e.data, 1); this.done(); }); break; >+ case 5: test_NaN.step(function() { assert_equals(e.data, NaN); this.done(); }); break; >+ case 6: test_Infinity.step(function() { assert_equals(e.data, Infinity); this.done(); }); break; >+ case 7: test_string.step(function() { assert_equals(e.data, 'foo'); this.done(); }); break; >+ case 8: test_date.step(function() { assert_true(sameDate(e.data, date)); this.done(); }); break; >+ case 9: test_regex.step(function() { assert_equals('' + e.data, '/foo/'); assert_equals(e.data instanceof RegExp, true, 'e.data instanceof RegExp'); this.done(); }); break; >+ // not testing it any more, as cloning host objects will now raise exceptions. TODO: add (exceptional) tests for these. >+ case 10: test_self.step(function() { assert_equals(e.data, null); this.done(); }); break; >+ case 11: test_array.step(function() { assert_array_equals_(e.data, cloned_array, 'array'); this.done(); }); break; >+ case 12: test_object.step(function() { assert_object_equals_(e.data, cloned_object, 'object'); this.done(); }); break; >+ case 13: >+ test_error.step(function() { assert_equals(e.data, null, 'new Error()'); this.done(); }); >+ setTimeout(test_unreached.step_func(function() { assert_equals(j, 14); this.done(); }), 50); >+ break; >+ default: test_unreached.step(function() { assert_unreached('got an unexpected message event ('+j+')'); }); >+ }; >+ j++; >+ } >+ >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011-expected.txt >new file mode 100644 >index 00000000000..78195c84408 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS posting an imagedata (from a cloned canvas) in an array >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011.html >new file mode 100644 >index 00000000000..782b3208ba4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011.html >@@ -0,0 +1,29 @@ >+<!doctype html> >+<title>posting an imagedata (from a cloned canvas) in an array</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ >+ var canvas = document.createElement('canvas'); >+ var clone = canvas.cloneNode(true); >+ var ctx = clone.getContext('2d'); >+ var imagedata = ctx.getImageData(0, 0, 300, 150); >+ postMessage([imagedata], '*', []); >+ >+ onmessage = this.step_func(function(e) { >+ function processPixels(imagedata) { >+ var pixeldata = imagedata.data; >+ for (var i = 0; i < pixeldata.length; i = i+4) { >+ pixeldata[i] = 128; >+ assert_equals(pixeldata[i], 128); >+ } >+ } >+ processPixels(e.data[0]); >+ this.done(); >+ }); >+ >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012-expected.txt >new file mode 100644 >index 00000000000..dee05dc35f7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS loop in array in structured clone >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012.html >new file mode 100644 >index 00000000000..6efe4c114ab >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012.html >@@ -0,0 +1,16 @@ >+<!doctype html> >+<title>loop in array in structured clone</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ var x = []; >+ x[0] = x; >+ postMessage(x, '*', []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, e.data[0]); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013-expected.txt >new file mode 100644 >index 00000000000..5c11efb8791 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS loop in object in structured clone >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013.html >new file mode 100644 >index 00000000000..248958ea108 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<title>loop in object in structured clone</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ var x = {}; >+ x.foo = x; >+ postMessage(x, '*', []); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, e.data.foo); >+ this.done(); >+ }); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014-expected.txt >new file mode 100644 >index 00000000000..07d85622c06 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS structured clone vs reference >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014.html >new file mode 100644 >index 00000000000..3c970c42ade >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<title>structured clone vs reference</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function(t) { >+ var x = []; >+ y = [x,x]; >+ postMessage(y, '*', []); >+ onmessage = t.step_func(function(e) { >+ assert_equals(e.data[0], e.data[1], 'e.data[0] === e.data[1]'); >+ assert_not_equals(e.data[0], x, 'e.data[0] !== x'); >+ t.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015-expected.txt >new file mode 100644 >index 00000000000..b2c6d6f6780 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015-expected.txt >@@ -0,0 +1,5 @@ >+CONSOLE MESSAGE: Unable to post message to http://example.org. Recipient has origin http://localhost:8800. >+ >+ >+PASS different origin >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015.html >new file mode 100644 >index 00000000000..a17c97be19a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015.html >@@ -0,0 +1,15 @@ >+<!doctype html> >+<title>different origin</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ postMessage('', 'http://example.org', []); >+ onmessage = this.step_func(function(e) { >+ assert_unreached(); >+ }); >+ setTimeout(this.step_func(function(){ this.done(); }), 50); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016-expected.txt >new file mode 100644 >index 00000000000..ebb54fb22b6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, data: >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016.html >new file mode 100644 >index 00000000000..51cadec7c17 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016.html >@@ -0,0 +1,23 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, data:</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="data:text/html,<script>onmessage = function(e) { parent.postMessage(e.origin, '*'); }; parent.postMessage('loaded', '*');</script>"></iframe> >+<div id=log></div> >+<script> >+async_test(function() { >+ onmessage = this.step_func(function(e) { >+ if (e.data === 'loaded') { >+ window[0].postMessage('', '*'); >+ return; >+ } >+ >+ assert_equals(e.data, location.protocol + '//' + location.host); >+ assert_equals(e.origin, 'null'); >+ assert_array_equals(e.ports, []); >+ this.done(); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017-expected.txt >new file mode 100644 >index 00000000000..dd4d946d7ca >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, about:blank >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017.html >new file mode 100644 >index 00000000000..94cd3e6ae2d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017.html >@@ -0,0 +1,18 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, about:blank</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="about:blank"></iframe> >+<div id=log></div> >+<script> >+async_test(function() { >+ window[0].postMessage('', '*', []); >+ window[0].onmessage = this.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ assert_array_equals(e.ports, []); >+ this.done(); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018-expected.txt >new file mode 100644 >index 00000000000..6bf533b33e5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, javascript: >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018.html >new file mode 100644 >index 00000000000..5525206e444 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018.html >@@ -0,0 +1,18 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, javascript:</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="javascript:''"></iframe> >+<div id=log></div> >+<script> >+async_test(function() { >+ window[0].postMessage('', '*', []); >+ window[0].onmessage = this.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ assert_array_equals(e.ports, []); >+ this.done(); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019-expected.txt >new file mode 100644 >index 00000000000..8efab48a20a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, scheme/host/port >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019.html >new file mode 100644 >index 00000000000..e9de6c36e1f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019.html >@@ -0,0 +1,20 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, scheme/host/port</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="../without-ports/019-1.html"></iframe> >+<div id=log></div> >+<script> >+async_test(function(test) { >+ onload = test.step_func(function() { >+ window[0].postMessage('', location.protocol.toUpperCase() + '//' + location.host.toUpperCase() + '/', []); >+ window[0].onmessage = test.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ assert_array_equals(e.ports, []); >+ test.done(); >+ }); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/020.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/020.html >new file mode 100644 >index 00000000000..4fc2c4e2dd9 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/020.html >@@ -0,0 +1,30 @@ >+<!doctype html> >+<title>cross-origin test</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="../without-ports/020-1.html"></iframe> >+<div id="log"></div> >+<script> >+var iframe = document.createElement('iframe'); >+var url_prefix = location.href.replace('://', '://www1.').replace(/\/with(out)?-ports\/[^\/]+$/, ''); >+var url = url_prefix + '/without-ports/020-1.html'; >+iframe.src = url; >+document.body.appendChild(iframe); >+</script> >+<div id=log></div> >+<script> >+onload = function() { >+ window[0].postMessage(1, location.href, []); >+ window[1].postMessage(2, url, []); >+ var i = 0; >+ onmessage = function(e) { >+ i++; >+ assert_equals(e.data[0], i); >+ assert_equals(e.data[1], location.protocol + '//' + location.host); >+ if (i === 2) { >+ done(); >+ } >+ }; >+}; >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/021.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/021.html >new file mode 100644 >index 00000000000..37a0767fee0 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/021.html >@@ -0,0 +1,30 @@ >+<!doctype html> >+<title>cross-origin test</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="../without-ports/020-1.html"></iframe> >+<div id="log"></div> >+<script> >+var iframe = document.createElement('iframe'); >+var url_prefix = location.href.replace('://', '://www1.').replace(/\/with(out)?-ports\/[^\/]+$/, ''); >+var url = url_prefix + '/without-ports/020-1.html'; >+iframe.src = url; >+document.body.appendChild(iframe); >+</script> >+<div id=log></div> >+<script> >+onload = function() { >+ window[0].postMessage(1, '*', []); >+ window[1].postMessage(2, '*', []); >+ var i = 0; >+ onmessage = function(e) { >+ i++; >+ assert_equals(e.data[0], i); >+ assert_equals(e.data[1], location.protocol + '//' + location.host); >+ if (i === 2) { >+ done(); >+ } >+ }; >+}; >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023-expected.txt >new file mode 100644 >index 00000000000..1aaae9a1a0a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS null ports >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html >new file mode 100644 >index 00000000000..da6a5c49a44 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html >@@ -0,0 +1,11 @@ >+<!doctype html> >+<title>null ports</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+test(function(t) { >+ assert_throws(new TypeError, () => postMessage('', '*', null)); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024-expected.txt >new file mode 100644 >index 00000000000..16bdd9c8943 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS undefined as ports >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024.html >new file mode 100644 >index 00000000000..e6c0dcba086 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024.html >@@ -0,0 +1,15 @@ >+<!doctype html> >+<title>undefined as ports</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ postMessage('', '*', undefined); >+ onmessage = this.step_func(function(e) { >+ assert_array_equals(e.ports, []); >+ this.done(); >+ }); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025-expected.txt >new file mode 100644 >index 00000000000..36a7fa5826c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS 1 as ports >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html >new file mode 100644 >index 00000000000..9a0e5cf6ffb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<title>1 as ports</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+test(function() { >+ assert_throws(new TypeError(), function() { >+ postMessage('', '*', 1); >+ }); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026-expected.txt >new file mode 100644 >index 00000000000..9623bed9cb9 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS object with length as transferable >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html >new file mode 100644 >index 00000000000..cf5c5e18ae5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<title>object with length as transferable</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+test(function() { >+ assert_throws(new TypeError(), function() { >+ postMessage('', '*', {length:1}); >+ }); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027-expected.txt >new file mode 100644 >index 00000000000..ba107a85a64 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027-expected.txt >@@ -0,0 +1,4 @@ >+ >+PASS MessageChannel's ports as MessagePort objects >+PASS Old-style array objects >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html >new file mode 100644 >index 00000000000..e5f8c9c14ab >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html >@@ -0,0 +1,26 @@ >+<!doctype html> >+<title>message channel as ports</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function(t) { >+ var channel = new MessageChannel(); >+ postMessage('', '*', [channel.port1, channel.port2]); >+ onmessage = t.step_func(function(e) { >+ assert_equals(e.ports.length, 2); >+ t.done(); >+ }); >+}, "MessageChannel's ports as MessagePort objects"); >+ >+test(() => { >+ var channel = new MessageChannel(); >+ channel[0] = channel.port1; >+ channel[1] = channel.port2; >+ channel.length = 2; >+ assert_throws(new TypeError(), >+ () => { postMessage('', '*', channel) }, >+ 'Old-style WebIDL arrays must throw a type error'); >+}, "Old-style array objects"); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/w3c-import.log >new file mode 100644 >index 00000000000..f8d406ef940 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/w3c-import.log >@@ -0,0 +1,40 @@ >+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/webmessaging/with-ports/001.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/002.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/004.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/005.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/006.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/007.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/010.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/011.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/012.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/013.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/014.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/015.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/016.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/017.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/018.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/019.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/020.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/021.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/024.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001-expected.txt >new file mode 100644 >index 00000000000..4791191bc7a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving broken url >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html >new file mode 100644 >index 00000000000..8f77c31fc61 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html >@@ -0,0 +1,12 @@ >+<!doctype html> >+<title>resolving broken url</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+test(function() { >+ assert_throws('SYNTAX_ERR', function() { >+ postMessage('', 'http://foo bar'); >+ }, 'should have failed to resolve'); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002-expected.txt >new file mode 100644 >index 00000000000..54fc888bbd4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving url with stuff in host-specific >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002.html >new file mode 100644 >index 00000000000..ef3eceb2a02 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>resolving url with stuff in host-specific</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', location.protocol + '//' + location.host + '//'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003-expected.txt >new file mode 100644 >index 00000000000..e9a59367c64 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving 'example.org' >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html >new file mode 100644 >index 00000000000..5021e09f46b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html >@@ -0,0 +1,12 @@ >+<!doctype html> >+<title>resolving 'example.org'</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+test(function() { >+ assert_throws('SYNTAX_ERR', function() { >+ postMessage('', 'example.org'); >+ }, 'targetOrigin is not an absolute url'); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004-expected.txt >new file mode 100644 >index 00000000000..2f447aada4e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS special value '/' >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004.html >new file mode 100644 >index 00000000000..9a9eb81a5de >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>special value '/'</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', '/'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005-expected.txt >new file mode 100644 >index 00000000000..7acb2318517 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving a same origin targetOrigin >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005.html >new file mode 100644 >index 00000000000..ed05a476bc4 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>resolving a same origin targetOrigin</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', location.protocol + '//' + location.host); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006-expected.txt >new file mode 100644 >index 00000000000..e83eead997d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS resolving a same origin targetOrigin with trailing slash >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006.html >new file mode 100644 >index 00000000000..47479ea0118 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>resolving a same origin targetOrigin with trailing slash</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', location.protocol + '//' + location.host + '/'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007-expected.txt >new file mode 100644 >index 00000000000..5f7931f1f96 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS targetOrigin '*' >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007.html >new file mode 100644 >index 00000000000..eb2b5c52e56 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>targetOrigin '*'</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ postMessage('', '*'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, ''); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008-expected.txt >new file mode 100644 >index 00000000000..c4925fc6bab >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS just one argument >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008.html >new file mode 100644 >index 00000000000..30bf607f357 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008.html >@@ -0,0 +1,12 @@ >+<!doctype html> >+<title>just one argument</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+test(function() { >+ assert_throws(new TypeError(), function() { >+ postMessage(''); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009-expected.txt >new file mode 100644 >index 00000000000..255a1a5f76b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS zero arguments >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html >new file mode 100644 >index 00000000000..779383da203 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html >@@ -0,0 +1,12 @@ >+<!doctype html> >+<title>zero arguments</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+test(function() { >+ assert_throws(new TypeError(), function() { >+ postMessage(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010-expected.txt >new file mode 100644 >index 00000000000..f3ce6455691 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010-expected.txt >@@ -0,0 +1,17 @@ >+ >+PASS undefined >+PASS null >+PASS false >+PASS true >+PASS 1 >+PASS NaN >+PASS Infinity >+PASS string >+FAIL date Can't find variable: sameDate >+PASS regex >+PASS self >+FAIL array Can't find variable: assert_array_equals_ >+FAIL object Can't find variable: assert_object_equals_ >+PASS error >+PASS unreached >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010.html >new file mode 100644 >index 00000000000..062316f6803 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010.html >@@ -0,0 +1,112 @@ >+<!doctype html> >+<title>message clone</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<script src="../support/compare.js"></script> >+<div id=log></div> >+<script> >+ var err = new Error('foo'); >+ var date = new Date(); >+ >+ var test_array = [ undefined, >+ null, >+ false, >+ true, >+ 1, >+ NaN, >+ Infinity, >+ 'foo', >+ date, >+ /foo/, >+ null/*self*/, >+ null/*err*/]; >+ >+ var cloned_array = [ undefined, >+ null, >+ false, >+ true, >+ 1, >+ NaN, >+ Infinity, >+ 'foo', >+ date, >+ /foo/, >+ null/*self*/, >+ null/*err*/]; >+ >+ var test_object = {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*/}; >+ >+ var cloned_object = {a:undefined, b:null, c:false, d:true, e:1, f:NaN, g:Infinity, h:'foo', i: date, j: /foo/, k:null, l: [], m: {}, n:null}; >+ >+ var tests = [undefined, null, >+ false, true, >+ 1, NaN, Infinity, >+ 'foo', >+ date, >+ /foo/, >+ /* ImageData, File, FileData, FileList, */ >+ null /*self*/, >+ test_array, >+ test_object, >+ null /*err*/]; >+ >+ for (var i = 0; i < tests.length; ++i) { >+ postMessage(tests[i], '*'); >+ } >+ >+ var test_undefined = async_test('undefined'); >+ var test_null = async_test('null'); >+ var test_false = async_test('false'); >+ var test_true = async_test('true'); >+ var test_1 = async_test('1'); >+ var test_NaN = async_test('NaN'); >+ var test_Infinity = async_test('Infinity'); >+ var test_string = async_test('string'); >+ var test_date = async_test('date'); >+ var test_regex = async_test('regex'); >+ var test_self = async_test('self'); >+ var test_array = async_test('array'); >+ var test_object = async_test('object'); >+ var test_error = async_test('error'); >+ var test_unreached = async_test('unreached'); >+ >+ var j = 0; >+ onmessage = function(e) { >+ switch (j) { >+ case 0: test_undefined.step(function() { assert_equals(e.data, undefined); this.done(); }); break; >+ case 1: test_null.step(function() { assert_equals(e.data, null); this.done(); }); break; >+ case 2: test_false.step(function() { assert_false(e.data); this.done(); }); break; >+ case 3: test_true.step(function() { assert_true(e.data); this.done(); }); break; >+ case 4: test_1.step(function() { assert_equals(e.data, 1); this.done(); }); break; >+ case 5: test_NaN.step(function() { assert_equals(e.data, NaN); this.done(); }); break; >+ case 6: test_Infinity.step(function() { assert_equals(e.data, Infinity); this.done(); }); break; >+ case 7: test_string.step(function() { assert_equals(e.data, 'foo'); this.done(); }); break; >+ case 8: test_date.step(function() { assert_true(sameDate(e.data, date)); this.done(); }); break; >+ case 9: test_regex.step(function() { assert_equals('' + e.data, '/foo/'); assert_equals(e.data instanceof RegExp, true, 'e.data instanceof RegExp'); this.done(); }); break; >+ // not testing it any more, as cloning host objects will now raise exceptions. TODO: add (exceptional) tests for these. >+ case 10: test_self.step(function() { assert_equals(e.data, null); this.done(); }); break; >+ case 11: test_array.step(function() { assert_array_equals_(e.data, cloned_array, 'array'); this.done(); }); break; >+ case 12: test_object.step(function() { assert_object_equals_(e.data, cloned_object, 'object'); this.done(); }); break; >+ case 13: >+ test_error.step(function() { assert_equals(e.data, null, 'new Error()'); this.done(); }); >+ setTimeout(test_unreached.step_func(function() { assert_equals(j, 14); this.done(); }), 50); >+ break; >+ default: test_unreached.step(function() { assert_unreached('got an unexpected message event ('+j+')'); }); >+ }; >+ j++; >+ } >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011-expected.txt >new file mode 100644 >index 00000000000..78195c84408 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS posting an imagedata (from a cloned canvas) in an array >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011.html >new file mode 100644 >index 00000000000..cac2990c49a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011.html >@@ -0,0 +1,29 @@ >+<!doctype html> >+<title>posting an imagedata (from a cloned canvas) in an array</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ >+ var canvas = document.createElement('canvas'); >+ var clone = canvas.cloneNode(true); >+ var ctx = clone.getContext('2d'); >+ var imagedata = ctx.getImageData(0, 0, 300, 150); >+ postMessage([imagedata], '*'); >+ >+ onmessage = this.step_func(function(e) { >+ function processPixels(imagedata) { >+ var pixeldata = imagedata.data; >+ for (var i = 0; i < pixeldata.length; i = i+4) { >+ pixeldata[i] = 128; >+ assert_equals(pixeldata[i], 128); >+ } >+ } >+ processPixels(e.data[0]); >+ this.done(); >+ }); >+ >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012-expected.txt >new file mode 100644 >index 00000000000..dee05dc35f7 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS loop in array in structured clone >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012.html >new file mode 100644 >index 00000000000..8eb46539b7e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012.html >@@ -0,0 +1,16 @@ >+<!doctype html> >+<title>loop in array in structured clone</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ var x = []; >+ x[0] = x; >+ postMessage(x, '*'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, e.data[0]); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013-expected.txt >new file mode 100644 >index 00000000000..5c11efb8791 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS loop in object in structured clone >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013.html >new file mode 100644 >index 00000000000..34ba76221aa >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<title>loop in object in structured clone</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function() { >+ var x = {}; >+ x.foo = x; >+ postMessage(x, '*'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data, e.data.foo); >+ this.done(); >+ }); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014-expected.txt >new file mode 100644 >index 00000000000..07d85622c06 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS structured clone vs reference >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014.html >new file mode 100644 >index 00000000000..f200aa46736 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<title>structured clone vs reference</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+async_test(function(t) { >+ var x = []; >+ y = [x,x]; >+ postMessage(y, '*'); >+ onmessage = t.step_func(function(e) { >+ assert_equals(e.data[0], e.data[1], 'e.data[0] === e.data[1]'); >+ assert_not_equals(e.data[0], x, 'e.data[0] !== x'); >+ t.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015-expected.txt >new file mode 100644 >index 00000000000..b2c6d6f6780 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015-expected.txt >@@ -0,0 +1,5 @@ >+CONSOLE MESSAGE: Unable to post message to http://example.org. Recipient has origin http://localhost:8800. >+ >+ >+PASS different origin >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015.html >new file mode 100644 >index 00000000000..a17c97be19a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015.html >@@ -0,0 +1,15 @@ >+<!doctype html> >+<title>different origin</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ postMessage('', 'http://example.org', []); >+ onmessage = this.step_func(function(e) { >+ assert_unreached(); >+ }); >+ setTimeout(this.step_func(function(){ this.done(); }), 50); >+}); >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016-expected.txt >new file mode 100644 >index 00000000000..ebb54fb22b6 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, data: >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016.html >new file mode 100644 >index 00000000000..51cadec7c17 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016.html >@@ -0,0 +1,23 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, data:</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="data:text/html,<script>onmessage = function(e) { parent.postMessage(e.origin, '*'); }; parent.postMessage('loaded', '*');</script>"></iframe> >+<div id=log></div> >+<script> >+async_test(function() { >+ onmessage = this.step_func(function(e) { >+ if (e.data === 'loaded') { >+ window[0].postMessage('', '*'); >+ return; >+ } >+ >+ assert_equals(e.data, location.protocol + '//' + location.host); >+ assert_equals(e.origin, 'null'); >+ assert_array_equals(e.ports, []); >+ this.done(); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017-expected.txt >new file mode 100644 >index 00000000000..dd4d946d7ca >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, about:blank >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017.html >new file mode 100644 >index 00000000000..a4a0483624f >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017.html >@@ -0,0 +1,18 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, about:blank</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="about:blank"></iframe> >+<div id=log></div> >+<script> >+async_test(function() { >+ window[0].postMessage('', '*'); >+ window[0].onmessage = this.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ assert_array_equals(e.ports, []); >+ this.done(); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018-expected.txt >new file mode 100644 >index 00000000000..6bf533b33e5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, javascript: >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018.html >new file mode 100644 >index 00000000000..207ae36ed83 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018.html >@@ -0,0 +1,17 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, javascript:</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="javascript:''"></iframe> >+<div id=log></div> >+<script> >+async_test(function() { >+ window[0].postMessage('', '*'); >+ window[0].onmessage = this.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ this.done(); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-1.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-1.html >new file mode 100644 >index 00000000000..513123ee6d5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-1.html >@@ -0,0 +1 @@ >+<!-- blank --> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-expected.txt >new file mode 100644 >index 00000000000..8efab48a20a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-expected.txt >@@ -0,0 +1,4 @@ >+ >+ >+PASS origin of the script that invoked the method, scheme/host/port >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019.html >new file mode 100644 >index 00000000000..38e7ca230ed >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019.html >@@ -0,0 +1,20 @@ >+<!doctype html> >+<title>origin of the script that invoked the method, scheme/host/port</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="../without-ports/019-1.html"></iframe> >+<div id=log></div> >+<script> >+async_test(function(test) { >+ onload = test.step_func(function() { >+ window[0].postMessage('', location.protocol.toUpperCase() + '//' + location.host.toUpperCase() + '/'); >+ window[0].onmessage = test.step_func(function(e) { >+ assert_equals(e.origin, location.protocol + '//' + location.host); >+ assert_array_equals(e.ports, []); >+ test.done(); >+ }); >+ }); >+}); >+</script> >+ >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020-1.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020-1.html >new file mode 100644 >index 00000000000..225bd7a41e3 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020-1.html >@@ -0,0 +1,5 @@ >+<script> >+onmessage = function(e) { >+ parent.postMessage([e.data, e.origin], '*'); >+} >+</script> >\ No newline at end of file >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020.html >new file mode 100644 >index 00000000000..e35a1128a0d >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020.html >@@ -0,0 +1,30 @@ >+<!doctype html> >+<title>cross-origin test</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="../without-ports/020-1.html"></iframe> >+<div id="log"></div> >+<script> >+var iframe = document.createElement('iframe'); >+var url_prefix = location.href.replace('://', '://www1.').replace(/\/with(out)?-ports\/[^\/]+$/, ''); >+var url = url_prefix + '/without-ports/020-1.html'; >+iframe.src = url; >+document.body.appendChild(iframe); >+</script> >+<div id=log></div> >+<script> >+onload = function() { >+ window[0].postMessage(1, location.href); >+ window[1].postMessage(2, url); >+ var i = 0; >+ onmessage = function(e) { >+ i++; >+ assert_equals(e.data[0], i); >+ assert_equals(e.data[1], location.protocol + '//' + location.host); >+ if (i == 2) { >+ done(); >+ } >+ }; >+}; >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/021.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/021.html >new file mode 100644 >index 00000000000..b240fa0cad5 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/021.html >@@ -0,0 +1,30 @@ >+<!doctype html> >+<title>cross-origin test</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<iframe src="../without-ports/020-1.html"></iframe> >+<div id="log"></div> >+<script> >+var iframe = document.createElement('iframe'); >+var url_prefix = location.href.replace('://', '://www1.').replace(/\/with(out)?-ports\/[^\/]+$/, ''); >+var url = url_prefix + '/without-ports/020-1.html'; >+iframe.src = url; >+document.body.appendChild(iframe); >+</script> >+<div id=log></div> >+<script> >+onload = function() { >+ window[0].postMessage(1, '*'); >+ window[1].postMessage(2, '*'); >+ var i = 0; >+ onmessage = function(e) { >+ i++; >+ assert_equals(e.data[0], i); >+ assert_equals(e.data[1], location.protocol + '//' + location.host); >+ if (i === 2) { >+ done(); >+ } >+ }; >+}; >+</script> >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023-expected.txt >new file mode 100644 >index 00000000000..71c4683852a >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Object cloning: own properties only, don't follow prototype >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023.html >new file mode 100644 >index 00000000000..1e12ac4a55e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023.html >@@ -0,0 +1,29 @@ >+<!doctype html> >+<title>Object cloning: own properties only, don't follow prototype</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id="log"></div> >+<script> >+var Parent = function(){ >+ this.c = "xyz"; >+}; >+ >+var Child = function(a, b) { >+ this.a = a; >+ this.b = b; >+}; >+Child.prototype = new Parent; >+ >+async_test(function() { >+ var obj = new Child(1, 2); >+ var ch = new MessageChannel(); >+ ch.port1.onmessage = this.step_func(function(e) { >+ for (var i in e.data.obj) >+ assert_not_equals(i, 'c'); >+ this.done(); >+ }); >+ ch.port2.start(); >+ ch.port2.postMessage({obj: obj}); >+}); >+ >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024-expected.txt >new file mode 100644 >index 00000000000..2c564b90d8b >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Object cloning: throw an exception if function values encountered >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html >new file mode 100644 >index 00000000000..8d99994599c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html >@@ -0,0 +1,14 @@ >+<!doctype html> >+<title>Object cloning: throw an exception if function values encountered</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+test(function() { >+ var obj = { f : function(){}}; >+ var ch = new MessageChannel(); >+ ch.port1.onmessage = function(){}; >+ ch.port2.start(); >+ assert_throws('DATA_CLONE_ERR', function() { ch.port2.postMessage({obj: obj}); }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js >new file mode 100644 >index 00000000000..c088fc98194 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js >@@ -0,0 +1,15 @@ >+importScripts("/resources/testharness.js"); >+ >+test(function() { >+ var ch = new MessageChannel(); >+ assert_true(ch.port1 instanceof MessagePort, >+ "Worker MessageChannel's port not an instance of MessagePort"); >+}, "Worker MessageChannel's port should be an instance of MessagePort"); >+ >+test(function() { >+ assert_throws(new TypeError(), function() { >+ new MessagePort() >+ }, "MessagePort is [[Callable]]"); >+}, "Worker MessagePort should not be [[Callable]]"); >+ >+done(); >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-expected.txt >new file mode 100644 >index 00000000000..d626e73f363 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-expected.txt >@@ -0,0 +1,5 @@ >+ >+PASS MessagePort constructor properties >+PASS Worker MessageChannel's port should be an instance of MessagePort >+PASS Worker MessagePort should not be [[Callable]] >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html >new file mode 100644 >index 00000000000..47bec6bd842 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html >@@ -0,0 +1,13 @@ >+<!doctype html> >+<title>MessagePort constructor properties</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+test(function() { >+ var ch = new MessageChannel(); >+ assert_true(ch.port1 instanceof MessagePort, "MessageChannel's port not an instance of MessagePort"); >+ assert_throws(new TypeError(), function () { var p = new MessagePort();}, "MessagePort is [[Callable]]"); >+}); >+fetch_tests_from_worker(new Worker("025-1.js")); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026-expected.txt >new file mode 100644 >index 00000000000..80ac01d0fa8 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Cloning objects with getter properties >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html >new file mode 100644 >index 00000000000..e8d799c5d25 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html >@@ -0,0 +1,16 @@ >+<!doctype html> >+<title>Cloning objects with getter properties</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ var obj = {}; >+ obj.__defineGetter__( "field", function(){ throw new Error("getter_should_propagate_exceptions"); }); >+ >+ assert_throws(new Error("getter_should_propagate_exceptions"), function() { >+ postMessage(obj, '*'); >+ }); >+ this.done(); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027-expected.txt >new file mode 100644 >index 00000000000..85004a584fb >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Cloning objects, preserving sharing >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027.html >new file mode 100644 >index 00000000000..36aa9446a5e >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027.html >@@ -0,0 +1,19 @@ >+<!doctype html> >+<title>Cloning objects, preserving sharing</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ var obj1 = {o: 1}; >+ var obj2 = {d: obj1}; >+ var obj3 = {d: obj1}; >+ var obj_dag = {b: obj2, c: obj3}; >+ >+ postMessage(obj_dag, '*'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data.b.d, e.data.c.d); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028-expected.txt >new file mode 100644 >index 00000000000..22ba9467d61 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028-expected.txt >@@ -0,0 +1,3 @@ >+ >+FAIL Cloning objects, preserving sharing #2 assert_equals: expected object "[object ImageData]" but got object "[object ImageData]" >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028.html >new file mode 100644 >index 00000000000..d51ad7d3b69 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028.html >@@ -0,0 +1,19 @@ >+<!doctype html> >+<title>Cloning objects, preserving sharing #2</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<canvas id="a" width=30 height=30></canvas> >+<div id=log></div> >+<script> >+async_test(function() { >+ var canvas = document.getElementsByTagName("canvas")[0]; >+ var context = canvas.getContext("2d"); >+ var img_data = context.getImageData(0, 0, 30, 30); >+ var obj = {a: img_data, b: {c: img_data, d: 3}}; >+ postMessage(obj, '*'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data.a, e.data.b.c); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029-expected.txt >new file mode 100644 >index 00000000000..5e09a287577 >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029-expected.txt >@@ -0,0 +1,3 @@ >+ >+PASS Check that getters don't linger after deletion wrt cloning >+ >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029.html b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029.html >new file mode 100644 >index 00000000000..4b1b38f741c >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029.html >@@ -0,0 +1,20 @@ >+<!doctype html> >+<title>Check that getters don't linger after deletion wrt cloning</title> >+<script src="/resources/testharness.js"></script> >+<script src="/resources/testharnessreport.js"></script> >+<div id=log></div> >+<script> >+async_test(function() { >+ var obj = {}; >+ obj.__defineGetter__( "a", function(){ return 2; } ); >+ obj.__defineSetter__( "a", function(v){ return; } ); >+ delete obj.a; >+ obj.a = 2; >+ >+ postMessage(obj, '*'); >+ onmessage = this.step_func(function(e) { >+ assert_equals(e.data.a, 2); >+ this.done(); >+ }); >+}); >+</script> >diff --git a/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/w3c-import.log b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/w3c-import.log >new file mode 100644 >index 00000000000..140df6828de >--- /dev/null >+++ b/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/w3c-import.log >@@ -0,0 +1,47 @@ >+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/webmessaging/without-ports/001.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/002.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/004.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/005.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/006.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/007.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/010.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/011.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/012.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/013.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/014.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/015.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/016.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/017.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/018.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019-1.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/019.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020-1.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/020.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/021.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/023.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/027.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/028.html >+/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/029.html >-- >2.17.0 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
jfernandez
:
review+
ews-watchlist
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 187001
:
343501
|
343503
|
343505
|
343506
|
343534
|
343538
|
343559
| 343588 |
343598