Skip to content

Commit

Permalink
Synchronize webmessaging WPT
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=260801
rdar://114567803

Reviewed by Tim Nguyen.

Synchronizes the webmessaging directory it up to and including
web-platform-tests/wpt@b4a7d79.

* LayoutTests/TestExpectations:
* LayoutTests/imported/w3c/resources/resource-files.json:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_Blob.any.js:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_event_properties-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_target_source-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent-trusted-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_initial_disabled-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessagePort_onmessage_start-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.any-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.any.js:
(test):
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.any.worker-expected.txt:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/blobs.html:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/cross-partition.https.tentative-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/cross-partition.https.tentative.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/resources/worker.js:
(async handler):
(handler): Deleted.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/detached-iframe.window-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/detached-iframe.window.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/detached-iframe.window.js: Added.
(async detached_frame_test):
(promise_test.async t):
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/dictionary-transferrable-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/user-activation.tentative-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/worker-post-after-close-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_CryptoKey_insecure.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_CryptoKey_insecure.sub.html: Added.
* 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_cross_domain_image_transfer_2d.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_cross_domain_image_transfer_2d.sub.htm: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_crosssite.sub-expected.txt: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_crosssite.sub.htm: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/resources/post-cryptokey-to-opener.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/resources/transfer-arraybuffer-to-parent.html: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/resources/w3c-import.log: Copied from LayoutTests/imported/w3c/web-platform-tests/webmessaging/support/w3c-import.log.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/support/cross-domain-image-receive.htm: Added.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/support/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/w3c-import.log:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/one-arg.html:
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008-expected.txt: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/008.html: Removed.
* LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/w3c-import.log:
* LayoutTests/platform/glib/imported/w3c/web-platform-tests/webmessaging/postMessage_cross_domain_image_transfer_2d.sub-expected.txt: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/cross-partition.https.tentative-expected.txt: Added.
* LayoutTests/platform/mac-wk1/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin-expected.txt:
* LayoutTests/tests-options.json:

Canonical link: https://commits.webkit.org/267452@main
  • Loading branch information
annevk committed Aug 30, 2023
1 parent 869ec83 commit 469475b
Show file tree
Hide file tree
Showing 58 changed files with 664 additions and 144 deletions.
3 changes: 3 additions & 0 deletions LayoutTests/TestExpectations
Original file line number Diff line number Diff line change
Expand Up @@ -1789,6 +1789,9 @@ webkit.org/b/187034 imported/w3c/web-platform-tests/webmessaging/with-ports/021.
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 ]

# This webmessaging WPT test crashes in debug.
webkit.org/b/260895 [ Debug ] imported/w3c/web-platform-tests/webmessaging/broadcastchannel/opaque-origin.html [ Crash ]

webkit.org/b/244022 imported/w3c/web-platform-tests/quirks/body-fills-html-quirk-vertical.html [ ImageOnlyFailure ]
webkit.org/b/244022 imported/w3c/web-platform-tests/quirks/body-fills-html-quirk.html [ ImageOnlyFailure ]
webkit.org/b/244022 imported/w3c/web-platform-tests/quirks/line-height-in-list-item.tentative.html [ ImageOnlyFailure ]
Expand Down
1 change: 1 addition & 0 deletions LayoutTests/imported/w3c/resources/resource-files.json
Original file line number Diff line number Diff line change
Expand Up @@ -7255,6 +7255,7 @@
"web-platform-tests/webmessaging/multi-globals/support/incumbent-document-domain.sub.html",
"web-platform-tests/webmessaging/multi-globals/support/incumbent.html",
"web-platform-tests/webmessaging/support/ChildWindowPostMessage.htm",
"web-platform-tests/webmessaging/support/cross-domain-image-receive.htm",
"web-platform-tests/webmessaging/without-ports/019-1.html",
"web-platform-tests/webmessaging/without-ports/020-1.html",
"web-platform-tests/websockets/multi-globals/support/incumbent.sub.html",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// META: title=postMessage() with a Blob
// META: script=/common/gc.js

var TARGET = null;
var SOURCE = null;
Expand All @@ -15,9 +16,7 @@
(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();
garbageCollect();

function TestMessageEvent(evt)
{
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

PASS BroadcastChannel constructor called as normal function
PASS postMessage results in correct event
PASS messages are delivered in port creation order
PASS messages aren't delivered to a closed port
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
test(function() {
assert_throws_js(
TypeError,
() => BroadcastChannel(""),
"Calling BroadcastChannel constructor without 'new' must throw"
);
}, "BroadcastChannel constructor called as normal function");

async_test(t => {
let c1 = new BroadcastChannel('eventType');
let c2 = new BroadcastChannel('eventType');
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

PASS BroadcastChannel constructor called as normal function
PASS postMessage results in correct event
PASS messages are delivered in port creation order
PASS messages aren't delivered to a closed port
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<meta charset=utf-8>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/common/gc.js"></script>
<script>
async_test(t => {
const c1 = new BroadcastChannel('blob');
Expand All @@ -27,9 +28,7 @@
(() => {
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();
garbageCollect();
}, 'Blobs work on BroadcastChannel');

async_test(t => {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

FAIL BroadcastChannel messages aren't received from a cross-partition iframe assert_equals: expected "iframe2 msg" but got "iframe1 msg"
FAIL BroadcastChannel messages aren't received from a nested iframe with a cross-site ancestor assert_equals: expected "iframe2 msg" but got "iframe1 msg"
FAIL BroadcastChannel messages aren't received from a cross-partition dedicated worker assert_equals: expected "worker2 msg" but got "worker1 msg"
FAIL BroadcastChannel messages aren't received from a cross-partition shared worker assert_equals: expected "worker2 msg" but got "worker1 msg"
FAIL BroadcastChannel messages aren't received from a cross-partition service worker assert_equals: expected "worker2 msg" but got "worker1 msg"

Loading

0 comments on commit 469475b

Please sign in to comment.