Bug 1509292 - Remove test test_broadcastchannel_worker.html r=baku
authorSimon Giesecke <sgiesecke@mozilla.com>
Wed, 29 Jan 2020 09:25:28 +0000
changeset 512055 f8aa2cf1196adafebe7e5626d43c1c1cb7c8f216
parent 512054 911bb8adb076ec3a56c2b8735bc4afd3fc24215f
child 512056 9db68c522c02b09937af365df9c3781649a0514b
push id37068
push usernerli@mozilla.com
push dateWed, 29 Jan 2020 15:51:04 +0000
treeherdermozilla-central@019ae805259f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbaku
bugs1509292
milestone74.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1509292 - Remove test test_broadcastchannel_worker.html r=baku The test suffers from a race condition, and shows frequest intermittent failures. There already is is WPT test testing the same in /testing/web-platform/tests/webmessaging/broadcastchannel/workers.html test case 'BroadcastChannel works in workers', which does not seem to suffer from this problem. Differential Revision: https://phabricator.services.mozilla.com/D61103
dom/broadcastchannel/tests/broadcastchannel_worker.js
dom/broadcastchannel/tests/mochitest.ini
dom/broadcastchannel/tests/test_broadcastchannel_worker.html
deleted file mode 100644
--- a/dom/broadcastchannel/tests/broadcastchannel_worker.js
+++ /dev/null
@@ -1,22 +0,0 @@
-onmessage = function(evt) {
-  if (evt.data != 0) {
-    var worker = new Worker("broadcastchannel_worker.js");
-    worker.onmessage = function(event) {
-      postMessage(event.data);
-    };
-    worker.postMessage(evt.data - 1);
-    return;
-  }
-
-  var bc = new BroadcastChannel("foobar");
-  bc.addEventListener("message", function(event) {
-    bc.postMessage(
-      event.data == "hello world from the window"
-        ? "hello world from the worker"
-        : "KO"
-    );
-    bc.close();
-  });
-
-  postMessage("READY");
-};
--- a/dom/broadcastchannel/tests/mochitest.ini
+++ b/dom/broadcastchannel/tests/mochitest.ini
@@ -1,13 +1,12 @@
 [DEFAULT]
 support-files =
   iframe_broadcastchannel.html
   broadcastchannel_sharedWorker.js
-  broadcastchannel_worker.js
   broadcastchannel_worker_alive.js
   broadcastchannel_worker_any.js
   !/dom/events/test/event_leak_utils.js
   file_mozbrowser.html
   file_mozbrowser2.html
   iframe_mozbrowser.html
   iframe_mozbrowser2.html
   testUrl1_bfcache.html
@@ -15,17 +14,16 @@ support-files =
 
 [test_broadcastchannel_any.html]
 [test_broadcastchannel_basic.html]
 [test_broadcastchannel_close.html]
 [test_broadcastchannel_close2.html]
 skip-if = debug && ((os == "mac") || (os == "linux" && bits == 64) || (os == "android")) #Bug 1447586
 [test_broadcastchannel_self.html]
 [test_broadcastchannel_sharedWorker.html]
-[test_broadcastchannel_worker.html]
 [test_broadcastchannel_worker_alive.html]
 [test_bfcache.html]
 [test_event_listener_leaks.html]
 skip-if = (os == "win" && processor == "aarch64") #bug 1535784
 [test_invalidState.html]
 [test_ordering.html]
 [test_dataCloning.html]
 [test_dataURL.html]
deleted file mode 100644
--- a/dom/broadcastchannel/tests/test_broadcastchannel_worker.html
+++ /dev/null
@@ -1,62 +0,0 @@
-<!--
-  Any copyright is dedicated to the Public Domain.
-  http://creativecommons.org/publicdomain/zero/1.0/
--->
-<!DOCTYPE HTML>
-<html>
-<!--
-Tests of DOM BroadcastChannel in workers
--->
-<head>
-  <title>Test for BroadcastChannel in workers</title>
-  <script src="/tests/SimpleTest/SimpleTest.js"></script>
-  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
-</head>
-<body>
-<p id="display"></p>
-<div id="content" style="display: none">
-
-</div>
-<pre id="test">
-<script class="testbody" language="javascript">
-
-function testWorker(x) {
-  var worker = new Worker("broadcastchannel_worker.js");
-
-  var bc = new BroadcastChannel("foobar");
-
-  worker.onmessage = function(event) {
-    if (event.data == "READY") {
-      ok(true, "Worker is ready!");
-      bc.postMessage("hello world from the window");
-    } else {
-      ok(false, "Something wrong happened");
-    }
-  };
-
-  bc.onmessage = function(event) {
-    is("hello world from the worker", event.data, "The message matches!");
-    bc.close();
-    runTests();
-  };
-
-  worker.postMessage(x);
-}
-
-var tests = [ 0, 3 ];
-function runTests() {
-  if (tests.length == 0) {
-    SimpleTest.finish();
-    return;
-  }
-
-  testWorker(tests.shift());
-}
-
-SimpleTest.waitForExplicitFinish();
-runTests();
-
-</script>
-</pre>
-</body>
-</html>