browser_aboutRestartRequired_buildid_false-positive.js (1180B)
1 "use strict"; 2 3 // On debug builds, crashing tabs results in much thinking, which 4 // slows down the test and results in intermittent test timeouts, 5 // so we'll pump up the expected timeout for this test. 6 requestLongerTimeout(2); 7 8 SimpleTest.expectChildProcessCrash(); 9 10 async function execTest(expectedValueAfter) { 11 setBuildidMatchDontSendEnv(); 12 await forceCleanProcesses(); 13 let eventPromise = getEventPromise("oop-browser-crashed", "false-positive"); 14 let tab = await openNewTab(false); 15 await eventPromise; 16 unsetBuildidMatchDontSendEnv(); 17 18 is( 19 await getFalsePositiveTelemetry(), 20 expectedValueAfter, 21 `Build ID mismatch false positive count should be ${expectedValueAfter}` 22 ); 23 24 await closeTab(tab); 25 } 26 27 add_task( 28 async function test_telemetry_restartrequired_falsepositive_mismatch() { 29 // Do not clear telemetry's scalars, otherwise --verify will break because 30 // the parent process will have kept memory of sent telemetry but that test 31 // will not be aware 32 33 info("Waiting for oop-browser-crashed event."); 34 35 // Run once 36 await execTest(1); 37 // Run a second time and make sure it has not increased 38 await execTest(1); 39 } 40 );