Bug 1671869 - [devtools] Fix intermittent failures for stacktraces test r=Honza
authorHubert Boma Manilla <hmanilla@mozilla.com>
Tue, 27 Oct 2020 15:26:06 +0000
changeset 554750 073a0a988ae1aefebc4e7d6d0a74c74625f1b23f
parent 554749 8b5452963b2cb9c754af6b8149439c3ca844199c
child 554751 b55c94de3ec736a26c5158f13a689a4be1cc127d
push id37898
push userabutkovits@mozilla.com
push dateWed, 28 Oct 2020 09:24:21 +0000
treeherdermozilla-central@83bf4fd3b1fb [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersHonza
bugs1671869
milestone84.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 1671869 - [devtools] Fix intermittent failures for stacktraces test r=Honza Differential Revision: https://phabricator.services.mozilla.com/D94707
devtools/shared/resources/tests/browser_resources_network_event_stacktraces.js
--- a/devtools/shared/resources/tests/browser_resources_network_event_stacktraces.js
+++ b/devtools/shared/resources/tests/browser_resources_network_event_stacktraces.js
@@ -47,37 +47,40 @@ async function testNetworkEventStackTrac
   const stackTraces = new Map();
 
   function onResourceAvailable(resources) {
     for (const resource of resources) {
       if (
         resource.resourceType === ResourceWatcher.TYPES.NETWORK_EVENT_STACKTRACE
       ) {
         ok(
-          !networkEvents.has(resource.channelId),
+          !networkEvents.has(resource.resourceId),
           "The network event does not exist"
         );
 
         is(
-          resource.stacktrace,
-          requestStub.expected.stacktrace,
+          resource.stacktraceAvailable,
+          requestStub.expected.stacktraceAvailable,
           "The stacktrace is available"
         );
         is(
           JSON.stringify(resource.lastFrame),
           JSON.stringify(requestStub.expected.lastFrame),
           "The last frame of the stacktrace is available"
         );
 
-        stackTraces.set(resource.channelId, true);
+        stackTraces.set(resource.resourceId, true);
         return;
       }
 
       if (resource.resourceType === ResourceWatcher.TYPES.NETWORK_EVENT) {
-        ok(stackTraces.has(resource.resourceId), "The stack trace exists");
+        ok(
+          stackTraces.has(resource.stacktraceResourceId),
+          "The stack trace does exists"
+        );
 
         networkEvents.set(resource.resourceId, true);
       }
     }
   }
 
   function onResourceUpdated() {}