Diff
Modified: trunk/LayoutTests/imported/w3c/ChangeLog (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/ChangeLog 2020-07-09 18:21:38 UTC (rev 264181)
@@ -1,3 +1,15 @@
+2020-07-09 Chris Dumez <cdu...@apple.com>
+
+ Resync web-platform-tests/webmessaging from upstream
+ https://bugs.webkit.org/show_bug.cgi?id=214143
+
+ Reviewed by Sam Weinig.
+
+ Resync web-platform-tests/webmessaging from upstream cef93b58e7cf31f1d47.
+
+ * resources/import-expectations.json:
+ * web-platform-tests/webmessaging/*: Updated.
+
2020-07-09 Clark Wang <clark_w...@apple.com>
Set Restrictions for channelCount, channelCountMode for PannerNode
Modified: trunk/LayoutTests/imported/w3c/resources/import-expectations.json (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/resources/import-expectations.json 2020-07-09 18:21:38 UTC (rev 264181)
@@ -405,7 +405,7 @@
"web-platform-tests/webauthn": "skip",
"web-platform-tests/webdriver": "skip",
"web-platform-tests/webgl": "skip",
- "web-platform-tests/webmessaging": "skip",
+ "web-platform-tests/webmessaging": "import",
"web-platform-tests/webmessaging/": "import",
"web-platform-tests/webrtc": "import",
"web-platform-tests/webrtc/legacy": "skip",
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_DataCloneErr.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -16,7 +16,7 @@
var channel = new MessageChannel();
channel.port1.start();
- assert_throws("DATA_CLONE_ERR", function()
+ assert_throws_dom("DATA_CLONE_ERR", function()
{
channel.port1.postMessage(navigator);
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_clone_port_error.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -16,7 +16,7 @@
var channel = new MessageChannel();
channel.port1.start();
- assert_throws("DATA_CLONE_ERR", function()
+ assert_throws_dom("DATA_CLONE_ERR", function()
{
channel.port1.postMessage("ports", [channel.port1]);
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/Channel_postMessage_ports_readonly_array.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -28,7 +28,7 @@
function TestMessageEvent(evt)
{
var channel3 = new MessageChannel();
- assert_throws(new TypeError(), () => {
+ assert_throws_js(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.");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/MessageEvent.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -21,7 +21,7 @@
test(function() {
var event = new MessageEvent("message");
- assert_throws(new TypeError(), function() {
+ assert_throws_js(TypeError, function() {
event.initMessageEvent();
}, "Not enough arguments to initMessageEvent");
}, "initMessageEvent with no arguments");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics-expected.txt 2020-07-09 18:21:38 UTC (rev 264181)
@@ -2,6 +2,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 messages aren't delivered to a port closed after calling postMessage. 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
+FAIL Closing a channel in onmessage prevents already queued tasks from firing onmessage events Can't find variable: BroadcastChannel
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/basics.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -69,6 +69,17 @@
c1.postMessage('test');
}, 'messages aren\'t delivered to a closed port');
+ async_test(t => {
+ let c1 = new BroadcastChannel('closed');
+ let c2 = new BroadcastChannel('closed');
+ let c3 = new BroadcastChannel('closed');
+
+ c2._onmessage_ = t.unreached_func();
+ c3._onmessage_ = t.step_func(() => t.done());
+ c1.postMessage('test');
+ c2.close();
+}, 'messages aren\'t delivered to a port closed after calling postMessage.');
+
async_test(t => {
let c1 = new BroadcastChannel('create-in-onmessage');
let c2 = new BroadcastChannel('create-in-onmessage');
@@ -87,8 +98,6 @@
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');
@@ -108,7 +117,6 @@
assert_array_equals(events, [
'c2: first',
'c3: first',
- 'c2: done',
'c3: done']);
t.done();
}
@@ -115,6 +123,6 @@
}));
c1.postMessage('first');
c1.postMessage('done');
- }, 'Closing a channel in onmessage doesn\'t cancel already queued events');
+ }, 'Closing a channel in onmessage prevents already queued tasks from firing onmessage events');
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface-expected.txt 2020-07-09 18:21:38 UTC (rev 264181)
@@ -1,5 +1,7 @@
-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 Should throw if no name is provided assert_throws_js: function "() => new BroadcastChannel()" threw object "ReferenceError: Can't find variable: BroadcastChannel" ("ReferenceError") expected instance of function "function TypeError() {
+ [native code]
+}" ("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
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/broadcastchannel/interface.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -4,7 +4,7 @@
<script src=""
<script>
-test(() => assert_throws(new TypeError(), () => new BroadcastChannel()),
+test(() => assert_throws_js(TypeError, () => new BroadcastChannel()),
'Should throw if no name is provided');
test(() => {
@@ -29,7 +29,7 @@
test(() => {
let c = new BroadcastChannel('');
- assert_throws(new TypeError(), () => c.postMessage());
+ assert_throws_js(TypeError, () => c.postMessage());
}, 'postMessage without parameters should throw');
test(() => {
@@ -51,7 +51,7 @@
test(() => {
let c = new BroadcastChannel('');
c.close();
- assert_throws('InvalidStateError', () => c.postMessage(''));
+ assert_throws_dom('InvalidStateError', () => c.postMessage(''));
}, 'postMessage after close should throw');
test(() => {
@@ -61,13 +61,13 @@
test(() => {
let c = new BroadcastChannel('');
- assert_throws('DataCloneError', () => c.postMessage(Symbol()));
+ assert_throws_dom('DataCloneError', () => c.postMessage(Symbol()));
}, 'postMessage should throw with uncloneable data');
test(() => {
let c = new BroadcastChannel('');
c.close();
- assert_throws('InvalidStateError', () => c.postMessage(Symbol()));
+ assert_throws_dom('InvalidStateError', () => c.postMessage(Symbol()));
}, 'postMessage should throw InvalidStateError after close, even with uncloneable data');
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/event.data.sub.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -9,7 +9,7 @@
<div id=log></div>
<div style="display:none">
- <iframe width="70%" _onload_="PostMessageTest()" src=""
+ <iframe width="70%" _onload_="PostMessageTest()" src=""
<iframe width="70%" _onload_="PostMessageTest()" src=""
</div>
@@ -25,7 +25,7 @@
var TYPE = "string";
var TARGET1 = document.querySelectorAll("iframe")[0];
var TARGET2 = document.querySelectorAll("iframe")[1];
- var XORIGIN = "{{location[scheme]}}://{{domains[www]}}" + PORT;
+ var XORIGIN = "{{location[scheme]}}://{{hosts[alt][]}}" + PORT;
var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT;
var ExpectedResult = [DATA, TYPE, DATA, TYPE];
var ActualResult = [];
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close-expected.txt 2020-07-09 18:21:38 UTC (rev 264181)
@@ -4,5 +4,5 @@
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
+FAIL close() detaches a MessagePort (but not the one its entangled with) assert_throws_dom: function "() => self.postMessage(null, "*", [c.port1])" did not throw
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/message-channels/close.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -62,7 +62,7 @@
test(() => {
const c = new MessageChannel();
c.port1.close();
- assert_throws("DataCloneError", () => self.postMessage(null, "*", [c.port1]));
+ assert_throws_dom("DataCloneError", () => self.postMessage(null, "*", [c.port1]));
self.postMessage(null, "*", [c.port2]);
}, "close() detaches a MessagePort (but not the one its entangled with)");
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_ArrayBuffer.sub.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -9,7 +9,7 @@
<div id=log></div>
<div style="display:none">
- <iframe width="70%" _onload_="PostMessageTest()" src=""
+ <iframe width="70%" _onload_="PostMessageTest()" src=""
</div>
<script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Document.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -25,7 +25,7 @@
{
test(function()
{
- assert_throws("DATA_CLONE_ERR", function()
+ assert_throws_dom("DATA_CLONE_ERR", TARGET.contentWindow.DOMException, function()
{
TARGET.contentWindow.postMessage(DATA, "*");
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_Function.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -25,7 +25,7 @@
{
test(function()
{
- assert_throws("DATA_CLONE_ERR", function()
+ assert_throws_dom("DATA_CLONE_ERR", TARGET.contentWindow.DOMException, function()
{
TARGET.contentWindow.postMessage(DATA, "*");
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_arrays.sub.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -9,7 +9,7 @@
<div id=log></div>
<div style="display:none">
- <iframe width="70%" _onload_="PostMessageTest()" src=""
+ <iframe width="70%" _onload_="PostMessageTest()" src=""
</div>
<script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_asterisk_xorigin.sub.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -9,7 +9,7 @@
<div id=log></div>
<div style="display:none">
- <iframe width="70%" _onload_="PostMessageTest()" src=""
+ <iframe width="70%" _onload_="PostMessageTest()" src=""
<iframe width="70%" _onload_="PostMessageTest()" src=""
</div>
@@ -23,7 +23,7 @@
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 XORIGIN = "{{location[scheme]}}://{{hosts[alt][]}}" + PORT;
var SORIGIN = "{{location[scheme]}}://{{host}}" + PORT;
var ExpectedResult = ["#1", XORIGIN, "#2", SORIGIN];
var ActualResult = [];
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_dup_transfer_objects.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -25,7 +25,7 @@
{
test(function()
{
- assert_throws("DATA_CLONE_ERR", function()
+ assert_throws_dom("DATA_CLONE_ERR", TARGET.contentWindow.DOMException, function()
{
assert_own_property(window, "MessageChannel", "window");
var channel = new MessageChannel();
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_invalid_targetOrigin.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -27,7 +27,7 @@
{
test(function()
{
- assert_throws("SYNTAX_ERR", function()
+ assert_throws_dom("SYNTAX_ERR", TARGET.contentWindow.DOMException, function()
{
TARGET.contentWindow.postMessage(DATA, DATA);
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/postMessage_objects.sub.htm 2020-07-09 18:21:38 UTC (rev 264181)
@@ -9,7 +9,7 @@
<div id=log></div>
<div style="display:none">
- <iframe width="70%" _onload_="PostMessageTest()" src=""
+ <iframe width="70%" _onload_="PostMessageTest()" src=""
</div>
<script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/broken-origin.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/broken-origin.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/broken-origin.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id="log"></div>
<script>
test(function() {
- assert_throws('SYNTAX_ERR', function() {
+ assert_throws_dom('SYNTAX_ERR', function() {
postMessage('', {targetOrigin: 'http://foo bar'});
}, 'should have failed to resolve');
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/null-transfer.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/null-transfer.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-options/null-transfer.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,6 +5,6 @@
<div id=log></div>
<script>
test(function(t) {
- assert_throws(new TypeError, () => postMessage('', {transfer: null}));
+ assert_throws_js(TypeError, () => postMessage('', {transfer: null}));
});
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/001.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id="log"></div>
<script>
test(function() {
- assert_throws('SYNTAX_ERR', function() {
+ assert_throws_dom('SYNTAX_ERR', function() {
postMessage('', 'http://foo bar', []);
}, 'should have failed to resolve');
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/003.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id="log"></div>
<script>
test(function() {
- assert_throws('SYNTAX_ERR', function() {
+ assert_throws_dom('SYNTAX_ERR', function() {
postMessage('', 'example.org', []);
}, 'targetOrigin is not an absolute url');
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/023.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id=log></div>
<script>
test(function(t) {
- assert_throws(new TypeError, () => postMessage('', '*', null));
+ assert_throws_js(TypeError, () => postMessage('', '*', null));
});
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/025.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id=log></div>
<script>
test(function() {
- assert_throws(new TypeError(), function() {
+ assert_throws_js(TypeError, function() {
postMessage('', '*', 1);
});
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/026.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id=log></div>
<script>
test(function() {
- assert_throws(new TypeError(), function() {
+ assert_throws_js(TypeError, function() {
postMessage('', '*', {length:1});
});
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/with-ports/027.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -18,9 +18,9 @@
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');
+ assert_throws_js(TypeError,
+ () => { postMessage('', '*', channel) },
+ 'Old-style WebIDL arrays must throw a type error');
}, "Old-style array objects");
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/001.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id="log"></div>
<script>
test(function() {
- assert_throws('SYNTAX_ERR', function() {
+ assert_throws_dom('SYNTAX_ERR', function() {
postMessage('', 'http://foo bar');
}, 'should have failed to resolve');
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/003.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id="log"></div>
<script>
test(function() {
- assert_throws('SYNTAX_ERR', function() {
+ assert_throws_dom('SYNTAX_ERR', function() {
postMessage('', 'example.org');
}, 'targetOrigin is not an absolute url');
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/009.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -5,7 +5,7 @@
<div id="log"></div>
<script>
test(function() {
- assert_throws(new TypeError(), function() {
+ assert_throws_js(TypeError, function() {
postMessage();
});
});
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/024.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -9,6 +9,6 @@
var ch = new MessageChannel();
ch.port1._onmessage_ = function(){};
ch.port2.start();
- assert_throws('DATA_CLONE_ERR', function() { ch.port2.postMessage({obj: obj}); });
+ assert_throws_dom('DATA_CLONE_ERR', function() { ch.port2.postMessage({obj: obj}); });
});
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025-1.js 2020-07-09 18:21:38 UTC (rev 264181)
@@ -7,7 +7,7 @@
}, "Worker MessageChannel's port should be an instance of MessagePort");
test(function() {
- assert_throws(new TypeError(), function() {
+ assert_throws_js(TypeError, function() {
new MessagePort()
}, "MessagePort is [[Callable]]");
}, "Worker MessagePort should not be [[Callable]]");
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/025.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -7,7 +7,7 @@
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]]");
+ assert_throws_js(TypeError, function () { var p = new MessagePort();}, "MessagePort is [[Callable]]");
});
fetch_tests_from_worker(new Worker("025-1.js"));
</script>
Modified: trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html (264180 => 264181)
--- trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html 2020-07-09 17:33:55 UTC (rev 264180)
+++ trunk/LayoutTests/imported/w3c/web-platform-tests/webmessaging/without-ports/026.html 2020-07-09 18:21:38 UTC (rev 264181)
@@ -6,9 +6,10 @@
<script>
async_test(function() {
var obj = {};
- obj.__defineGetter__( "field", function(){ throw new Error("getter_should_propagate_exceptions"); });
+ var err = new Error("getter_should_propagate_exceptions");
+ obj.__defineGetter__( "field", function(){ throw err });
- assert_throws(new Error("getter_should_propagate_exceptions"), function() {
+ assert_throws_exactly(err, function() {
postMessage(obj, '*');
});
this.done();