mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Update web-platform-tests to revision b'468d01bbd84da2babf265c6af46947be68713440'
This commit is contained in:
parent
35e95f55a1
commit
58e8ee674b
9438 changed files with 266112 additions and 106976 deletions
|
@ -0,0 +1,2 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Empty doc</title>
|
|
@ -0,0 +1,30 @@
|
|||
// Based on similar tests in html/infrastructure/safe-passing-of-structured-data/shared-array-buffers/.
|
||||
"use strict";
|
||||
self.importScripts("/resources/testharness.js");
|
||||
|
||||
let state = "start in worker";
|
||||
|
||||
self.onmessage = e => {
|
||||
if (e.data === "start in window") {
|
||||
assert_equals(state, "start in worker");
|
||||
e.source.postMessage(state);
|
||||
state = "we are expecting a messageerror due to the window sending us an RTCEncodedVideoFrame or RTCEncodedAudioFrame";
|
||||
} else {
|
||||
e.source.postMessage(`worker onmessage was reached when in state "${state}" and data ${e.data}`);
|
||||
}
|
||||
};
|
||||
|
||||
self.onmessageerror = e => {
|
||||
if (state === "we are expecting a messageerror due to the window sending us an RTCEncodedVideoFrame or RTCEncodedAudioFrame") {
|
||||
assert_equals(e.constructor.name, "ExtendableMessageEvent", "type");
|
||||
assert_equals(e.data, null, "data");
|
||||
assert_equals(e.origin, self.origin, "origin");
|
||||
assert_not_equals(e.source, null, "source");
|
||||
assert_equals(e.ports.length, 0, "ports length");
|
||||
|
||||
state = "onmessageerror was received in worker";
|
||||
e.source.postMessage(state);
|
||||
} else {
|
||||
e.source.postMessage(`worker onmessageerror was reached when in state "${state}" and data ${e.data}`);
|
||||
}
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue