Bug 1500141 - Force computed view in splitconsole test to avoid frequent failures;r=pbro
Differential Revision:
https://phabricator.services.mozilla.com/D9387
--- a/devtools/client/framework/test/browser_toolbox_telemetry_activate_splitconsole.js
+++ b/devtools/client/framework/test/browser_toolbox_telemetry_activate_splitconsole.js
@@ -46,16 +46,24 @@ const DATA = [
extra: {
host: "bottom",
width: "1300",
},
},
];
add_task(async function() {
+ // See Bug 1500141: this test frequently fails on beta because some highlighter
+ // requests made by the BoxModel component in the layout view come back when the
+ // connection between the client and the server has been destroyed. We are forcing
+ // the computed view here to avoid the failures but ideally we should have an event
+ // or a promise on the inspector we can wait for to be sure the initialization is over.
+ // Logged Bug 1500918 to investigate this.
+ await pushPref("devtools.inspector.activeSidebar", "computedview");
+
// Let's reset the counts.
Services.telemetry.clearEvents();
// Ensure no events have been logged
const snapshot = Services.telemetry.snapshotEvents(OPTOUT, true);
ok(!snapshot.parent, "No events have been logged for the main process");
const tab = await addTab(URL);