fune/testing/web-platform/tests/workers/Worker-custom-event.any.js
kdillon cb292269a5 Bug 1537562 [wpt PR 15921] - Updating tests from legacy harness and upstreaming to external/wpt/workers., a=testonly
Automatic update from web-platform-tests
Updating tests from legacy harness and upstreaming to external/wpt/workers.

These tests have been converted to use .any.js form.

Bug: 795636
Change-Id: I85f6e4db1626ab00f3efc80d275b2af636f70b1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529744
Commit-Queue: Katie Dillon <kdillon@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642233}

--

wpt-commits: 31e7fd0f555c857935242bff9f50fe37836d542b
wpt-pr: 15921
2019-04-24 11:18:30 +01:00

8 lines
244 B
JavaScript

// META: global=!default,worker
async_test(t => {
var target = self;
target.addEventListener('custom-event', t.step_func_done());
var event = new Event('custom-event');
target.dispatchEvent(event);
}, 'Test CustomEvents on workers.');