Update web-platform-tests to revision 4333a1d2f109795547fc5e22ebfc8481fa649de7

This commit is contained in:
WPT Sync Bot 2018-06-22 21:05:34 -04:00
parent 728ebcc932
commit 8c46b67f8e
456 changed files with 10561 additions and 5108 deletions

View file

@ -1,9 +1,3 @@
<!DOCTYPE html>
<title>DedicatedWorker: import</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
// Starts a dedicated worker for |scriptURL| and waits until the list of
// imported modules is sent from the worker. Passes if the list is equal to
// |expectedImportedModules|.
@ -43,5 +37,3 @@ import_test('resources/dynamic-import-and-then-static-import-worker.js',
import_test('resources/eval-dynamic-import-worker.js',
['export-on-load-script.js'],
'eval(import()).');
</script>

View file

@ -0,0 +1,15 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test terminating a nested workers by calling terminate() from its parent worker</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(function() {
const worker = new Worker("support/parent_of_nested_worker.js");
worker.onmessage = this.step_func_done(function(e) {
assert_equals(e.data, "Pass");
done();
});
worker.postMessage("close");
});
</script>

View file

@ -0,0 +1,12 @@
importScripts("/resources/testharness.js");
async_test(function() {
if (!self.Worker)
done();
const worker = new Worker("support/WorkerClose.js");
worker.onmessage = this.step_func_done(function(e) {
assert_equals(e.data, "close");
done();
});
worker.postMessage("close");
}, "Nested work that closes itself");

View file

@ -0,0 +1,11 @@
importScripts("/resources/testharness.js");
async_test(function() {
const worker = new Worker("support/ImportScripts.js");
worker.postMessage("ping");
worker.onmessage = this.step_func_done(function(evt) {
assert_equals(evt.data, "Pass");
worker.terminate();
});
}, "Nested worker that calls importScripts()");
done();

View file

@ -0,0 +1,11 @@
importScripts("/resources/testharness.js");
async_test(function() {
const worker = new Worker("support/sync_xhr.js");
worker.postMessage("ping");
worker.onmessage = this.step_func_done(function(evt) {
assert_equals(evt.data, "Pass");
worker.terminate();
});
}, "Nested worker that issues a sync XHR");
done();

View file

@ -0,0 +1,14 @@
<!DOCTYPE html>
<meta charset="utf-8">
<title>Test terminating a chain of nested workers by calling terminate() from the owning document</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
async_test(function() {
const worker = new Worker("support/parent_of_nested_worker.js");
worker.onmessage = this.step_func_done(function(e) {
assert_equals(e.data, "Pass");
worker.terminate();
});
});
</script>

View file

@ -0,0 +1,14 @@
try {
var worker = new Worker("WorkerBasic.js");
worker.onmessage = function(e) {
if (e.data == "Pass") {
postMessage("Pass");
} else if (e.data == "close") {
close();
postMessage("Pass");
}
};
worker.postMessage("start");
} catch (e) {
postMessage("Fail: " + e);
}

View file

@ -0,0 +1,13 @@
try
{
const request = new XMLHttpRequest();
request.open("GET", "sync_xhr_target.xml", false);
request.send();
result = request.responseText == "<foo>sometext</foo>\n" ? "Pass" : "Fail";
postMessage(result);
}
catch(ex)
{
result = "Fail";
postMessage(result);
}

View file

@ -0,0 +1 @@
<foo>sometext</foo>