fune/testing/web-platform/tests/workers/Worker-replace-event-handler.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

11 lines
303 B
JavaScript

// META: global=!default,worker
// This is a regression test for a crash bug in Chrome: http://crbug.com/239669
function update() {
onmessage = undefined;
}
test(() => {
for (var i = 0; i < 8; ++i) {
update();
}
}, "Tests that repeatedly setting 'onmessage' within a worker doesn't crash.");