Bug 1590075 - Enable browser_bug1004814.js for Fission, r=nika
authorAndrea Marchesini <amarchesini@mozilla.com>
Tue, 22 Oct 2019 15:34:38 +0000
changeset 498669 ad7a152bc66c0d411a6fb0b210d675abed9693c7
parent 498668 5ffff1f76af292e4c76758d684b99e864853e492
child 498670 f7c323d26c22ec61e3ea74700aceb87df280e1b2
push id98595
push useramarchesini@mozilla.com
push dateWed, 23 Oct 2019 06:12:30 +0000
treeherderautoland@ad7a152bc66c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnika
bugs1590075, 1004814
milestone72.0a1
first release with
nightly linux32
ad7a152bc66c / 72.0a1 / 20191023094816 / files
nightly linux64
ad7a152bc66c / 72.0a1 / 20191023094816 / files
nightly mac
ad7a152bc66c / 72.0a1 / 20191023094816 / files
nightly win32
ad7a152bc66c / 72.0a1 / 20191023094816 / files
nightly win64
ad7a152bc66c / 72.0a1 / 20191023094816 / files
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1590075 - Enable browser_bug1004814.js for Fission, r=nika Differential Revision: https://phabricator.services.mozilla.com/D50027
dom/tests/browser/browser_bug1004814.js
dom/tests/browser/test_bug1004814.html
--- a/dom/tests/browser/browser_bug1004814.js
+++ b/dom/tests/browser/browser_bug1004814.js
@@ -1,19 +1,19 @@
 /* vim:set ts=2 sw=2 sts=2 et: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 add_task(async function() {
-  await BrowserTestUtils.withNewTab("about:blank", async function(aBrowser) {
+  const TEST_URI =
+    "http://example.com/browser/dom/tests/browser/test_bug1004814.html";
+
+  await BrowserTestUtils.withNewTab(TEST_URI, async aBrowser => {
     let duration = await ContentTask.spawn(aBrowser, null, function(opts) {
-      const TEST_URI =
-        "http://example.com/browser/dom/tests/browser/test_bug1004814.html";
-
       return new Promise(resolve => {
         let ConsoleObserver = {
           QueryInterface: ChromeUtils.generateQI([Ci.nsIObserver]),
 
           observe(aSubject, aTopic, aData) {
             var obj = aSubject.wrappedJSObject;
             if (
               obj.arguments.length != 1 ||
@@ -25,18 +25,18 @@ add_task(async function() {
 
             Services.obs.removeObserver(this, "console-api-log-event");
             resolve(obj.timer.duration);
           },
         };
 
         Services.obs.addObserver(ConsoleObserver, "console-api-log-event");
 
-        // Redirect the browser to the correct document to start the test
-        content.document.location = TEST_URI;
+        var w = new content.Worker("worker_bug1004814.js");
+        w.postMessage(true);
       });
     });
 
     ok(
       duration > 0,
       "ConsoleEvent.timer.duration > 0: " + duration + " ~ 200ms"
     );
   });
--- a/dom/tests/browser/test_bug1004814.html
+++ b/dom/tests/browser/test_bug1004814.html
@@ -1,14 +1,8 @@
 <!DOCTYPE HTML>
 <html>
   <head>
     <title>Console API test bug 1004814</title>
   </head>
   <body>
-    <script>
-
-var w = new Worker("worker_bug1004814.js");
-w.postMessage(true);
-
-    </script>
   </body>
 </html>