Bug 1507412 [wpt PR 14066] - Worker: Separate worker-from-blob-url.window.html to filter out failing tests in a more fine-grained way, a=testonly

Automatic update from web-platform-testsWorker: Separate worker-from-blob-url.window.html to filter out failing tests in a more fine-grained way

This test file should be separated into 2 files (one for dedicated workers and
the other for shared workers). This is because Edge and Safari don't support
shared workers, and Chrome has an issue on shared workers with Blob URL
revocation, so some tests are expected to fail on them. By separating the file,
browsers can filter out failing tests in a more fine grained way.

Bug: 655458, 800898
Change-Id: I9ea6c76dc9b6841bf6aaa98251c81f292dd460cf
Reviewed-on: https://chromium-review.googlesource.com/c/1337129
Commit-Queue: Hiroki Nakagawa <nhiroki@chromium.org>
Reviewed-by: Hiroshige Hayashizaki <hiroshige@chromium.org>
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609586}

--

wpt-commits: d0a6ed2b3686ac287842e4b8e813b44ee14553ff
wpt-pr: 14066
This commit is contained in:
Hiroki Nakagawa 2018-11-22 10:34:28 +00:00 committed by moz-wptsync-bot
parent bc0a8b94c0
commit a7f7f006b4
2 changed files with 28 additions and 24 deletions

View File

@ -0,0 +1,28 @@
function message_from_port(port) {
return new Promise(resolve => {
port.onmessage = e => resolve(e.data);
});
}
promise_test(async t => {
const run_result = 'worker_OK';
const blob_contents = 'self.postMessage("' + run_result + '");';
const blob = new Blob([blob_contents]);
const url = URL.createObjectURL(blob);
const worker = new Worker(url);
const reply = await message_from_port(worker);
assert_equals(reply, run_result);
}, 'Creating a dedicated worker from a blob URL works.');
promise_test(async t => {
const run_result = 'worker_OK';
const blob_contents = 'self.postMessage("' + run_result + '");';
const blob = new Blob([blob_contents]);
const url = URL.createObjectURL(blob);
const worker = new Worker(url);
URL.revokeObjectURL(url);
const reply = await message_from_port(worker);
assert_equals(reply, run_result);
}, 'Creating a dedicated worker from a blob URL works immediately before revoking.');

View File

@ -4,29 +4,6 @@ function message_from_port(port) {
});
}
promise_test(async t => {
const run_result = 'worker_OK';
const blob_contents = 'self.postMessage("' + run_result + '");';
const blob = new Blob([blob_contents]);
const url = URL.createObjectURL(blob);
const worker = new Worker(url);
const reply = await message_from_port(worker);
assert_equals(reply, run_result);
}, 'Creating a dedicated worker from a blob URL works.');
promise_test(async t => {
const run_result = 'worker_OK';
const blob_contents = 'self.postMessage("' + run_result + '");';
const blob = new Blob([blob_contents]);
const url = URL.createObjectURL(blob);
const worker = new Worker(url);
URL.revokeObjectURL(url);
const reply = await message_from_port(worker);
assert_equals(reply, run_result);
}, 'Creating a dedicated worker from a blob URL works immediately before revoking.');
promise_test(async t => {
const run_result = 'worker_OK_';
const blob_contents =
@ -57,7 +34,6 @@ promise_test(async t => {
assert_equals(reply, run_result);
}, 'Creating a shared worker from a blob URL works immediately before revoking.');
promise_test(async t => {
const run_result = 'worker_OK_';
const blob_contents =