Bug 1623427 address timing of child api call in activityLog test r=rpl
☠☠ backed out by 4a2c49e70cc1 ☠ ☠
authorShane Caraveo <scaraveo@mozilla.com>
Fri, 29 May 2020 15:24:35 +0000
changeset 533002 0bb39e97d6dd7b6b46bfd02b1f9fa30cbf075ed2
parent 533001 ceb8b83ec5b319135839a5cf2c0883339b0220b5
child 533003 da329064b7ef97c7a03ad17578c9e0cd4157f87d
push id37461
push userccoroiu@mozilla.com
push dateFri, 29 May 2020 21:46:31 +0000
treeherdermozilla-central@a58cc68b0c51 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersrpl
bugs1623427
milestone78.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 1623427 address timing of child api call in activityLog test r=rpl Differential Revision: https://phabricator.services.mozilla.com/D76784
toolkit/components/extensions/test/mochitest/mochitest-common.ini
toolkit/components/extensions/test/mochitest/test_ext_activityLog.html
--- a/toolkit/components/extensions/test/mochitest/mochitest-common.ini
+++ b/toolkit/components/extensions/test/mochitest/mochitest-common.ini
@@ -55,17 +55,17 @@ support-files =
   !/toolkit/components/passwordmgr/test/authenticate.sjs
   file_redirect_data_uri.html
   file_redirect_cors_bypass.html
 prefs =
   security.mixed_content.upgrade_display_content=false
   browser.chrome.guess_favicon=true
 
 [test_ext_activityLog.html]
-skip-if = os == 'android' || tsan || (os == 'linux' && bits == 64) || (!debug && os == 'mac') # Times out on TSan, bug 1612707, 1623427
+skip-if = os == 'android' || tsan # Times out on TSan, bug 1612707
 [test_ext_async_clipboard.html]
 skip-if = toolkit == 'android' || tsan # near-permafail after landing bug 1270059: Bug 1523131. tsan: bug 1612707
 [test_ext_background_canvas.html]
 skip-if = !debug && !asan && bits == 64 && (os == "linux" || os == "mac") #Bug 1637475
 [test_ext_background_page.html]
 skip-if = (toolkit == 'android') # android doesn't have devtools
 [test_ext_canvas_resistFingerprinting.html]
 [test_ext_clipboard.html]
--- a/toolkit/components/extensions/test/mochitest/test_ext_activityLog.html
+++ b/toolkit/components/extensions/test/mochitest/test_ext_activityLog.html
@@ -193,26 +193,16 @@ add_task(async function test_api() {
         name: "test.onMessage",
         data: { args: ["runtest"] },
       },
       {
         type: "api_call",
         name: "test.sendMessage",
         data: { args: ["ready"] },
       },
-      {
-        type: "api_call",
-        name: "tabs.hide",
-        data: { args: ["__TAB_ID"] },
-      },
-      {
-        type: "api_event",
-        name: "test.onMessage",
-        data: { args: ["hideTab", "__TAB_ID"] },
-      },
       // Test parent api_event calls.
       {
         type: "api_call",
         name: "webRequest.onBeforeRequest.removeListener",
         data: {
           args: [],
         },
       },
@@ -258,16 +248,27 @@ add_task(async function test_api() {
         name: "test.sendMessage",
         data: { args: ["registered_script"], tabId: 1 },
       },
       {
         type: "api_call",
         name: "test.sendMessage",
         data: { args: ["content_script"], tabId: 1 },
       },
+      // Child api call
+      {
+        type: "api_call",
+        name: "tabs.hide",
+        data: { args: ["__TAB_ID"] },
+      },
+      {
+        type: "api_event",
+        name: "test.onMessage",
+        data: { args: ["hideTab", "__TAB_ID"] },
+      },
     ];
     browser.test.assertTrue(browser.activityLog, "activityLog is privileged");
 
     let tab;
     let handler = async details => {
       browser.test.log(`onExtensionActivity ${JSON.stringify(details)}`);
       let test = expecting.shift();
       if (!test) {
@@ -347,24 +348,25 @@ add_task(async function test_api() {
     },
     background: `(${backgroundScript})("${URL}", "${extensionUrl}")`,
   });
   await logger.startup();
   extension.sendMessage("runtest");
   await extension.awaitMessage("ready");
   logger.sendMessage("opentab");
   let id = await logger.awaitMessage("tabid");
-  extension.sendMessage("hideTab", id);
 
   await Promise.all([
     extension.awaitMessage("content_script"),
     extension.awaitMessage("registered_script"),
-    logger.awaitFinish("activity"),
   ]);
 
+  extension.sendMessage("hideTab", id);
+  await logger.awaitFinish("activity");
+
   // Stop watching because we get extra calls on extension shutdown
   // such as listener removal.
   logger.sendMessage("done");
 
   await extension.unload();
   await unlogged.unload();
   await logger.unload();
 });