mirror of
https://github.com/servo/servo.git
synced 2025-08-25 15:18:22 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -1,5 +1,5 @@
|
|||
@zqzhang
|
||||
@aogilvie
|
||||
@Ms2ger
|
||||
@jdm
|
||||
@mkruisselbrink
|
||||
@annevk
|
||||
|
|
|
@ -1,10 +1,2 @@
|
|||
This directory contains the HTML5 Web Messaging test suite.
|
||||
|
||||
The following document contains a list of each test file in the test suite and the results of running the test file on several browsers <http://www.w3.org/wiki/Webapps/Interop/WebMessaging>.
|
||||
|
||||
To run this test suite within a browser, go to: <http://w3c-test.org/web-platform-tests/master/webmessaging/>.
|
||||
|
||||
The latest Editor's Draft of HTML5 Web Messaging is: <http://dev.w3.org/html5/postmsg/>.
|
||||
|
||||
The latest W3C Technical Report of HTML5 Web Messaging is <http://www.w3.org/TR/webmessaging/>.
|
||||
|
||||
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).
|
||||
|
|
|
@ -6,14 +6,21 @@
|
|||
<script>
|
||||
async_test(function(t) {
|
||||
var channel = new MessageChannel();
|
||||
channel[0] = channel.port1;
|
||||
channel[1] = channel.port2;
|
||||
channel.length = 2;
|
||||
postMessage('', '*', channel);
|
||||
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>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue