Bug 1303800 - Turn on javascript.options.asyncstack pref for Netmonitor tests that need it (beta) on a CLOSED TREE. r=ochameau, a=test-only a=blocker
authorJarda Snajdr <jsnajdr@gmail.com>
Mon, 19 Sep 2016 23:33:00 +0200
changeset 350305 846d7032d2e0da6910cab171d4fef0f47a44450b
parent 350304 a7853dad14c94df2f91d345f366b97fcbdeb4693
child 350306 5c9cc179d047eec13af2f39ae63f2ef3e1fb5cad
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersochameau, test-only, blocker
bugs1303800
milestone50.0
Bug 1303800 - Turn on javascript.options.asyncstack pref for Netmonitor tests that need it (beta) on a CLOSED TREE. r=ochameau, a=test-only a=blocker
devtools/client/netmonitor/test/browser_net_cause.js
--- a/devtools/client/netmonitor/test/browser_net_cause.js
+++ b/devtools/client/netmonitor/test/browser_net_cause.js
@@ -73,16 +73,19 @@ const EXPECTED_REQUESTS = [
     url: EXAMPLE_URL + "beacon_request",
     causeType: "beacon",
     causeUri: CAUSE_URL,
     stack: [{ fn: "performBeaconRequest", file: CAUSE_FILE_NAME, line: 30 }]
   },
 ];
 
 var test = Task.async(function* () {
+  // Async stacks aren't on by default in all builds
+  yield SpecialPowers.pushPrefEnv({ set: [["javascript.options.asyncstack", true]] });
+
   // the initNetMonitor function clears the network request list after the
   // page is loaded. That's why we first load a bogus page from SIMPLE_URL,
   // and only then load the real thing from CAUSE_URL - we want to catch
   // all the requests the page is making, not only the XHRs.
   // We can't use about:blank here, because initNetMonitor checks that the
   // page has actually made at least one request.
   let [, debuggee, monitor] = yield initNetMonitor(SIMPLE_URL);
   let { $, NetMonitorView } = monitor.panelWin;