forked from mirrors/gecko-dev
Bug 1876590 - Update browser chome test for buildid_reader crate r=jld
Removing tests because we cannot change platform.ini file anymore Differential Revision: https://phabricator.services.mozilla.com/D203736
This commit is contained in:
parent
35f89c40bd
commit
de089f1a73
6 changed files with 1 additions and 136 deletions
|
|
@ -9,15 +9,3 @@ prefs = [
|
|||
]
|
||||
|
||||
["browser_aboutRestartRequired_basic.js"]
|
||||
|
||||
# Bug 1876056: re-enable once bug 1877361 is fixed
|
||||
#["browser_aboutRestartRequired_buildid_false-positive.js"]
|
||||
#skip-if = ["win11_2009 && msix && debug"] # bug 1823581
|
||||
|
||||
# Bug 1888355: re-enable once bug 1877361 is fixed
|
||||
#["browser_aboutRestartRequired_buildid_mismatch.js"]
|
||||
#skip-if = ["win11_2009 && msix && debug"] # bug 1823581
|
||||
|
||||
# Bug 1888355: re-enable once bug 1877361 is fixed
|
||||
#["browser_aboutRestartRequired_buildid_no-platform-ini.js"]
|
||||
#skip-if = ["win11_2009 && msix && debug"] # bug 1823581
|
||||
|
|
|
|||
|
|
@ -17,7 +17,6 @@ add_task(async function test_browser_crashed_false_positive_event() {
|
|||
"Build ID mismatch false positive count should be undefined"
|
||||
);
|
||||
|
||||
ok(await ensureBuildID(), "System has correct platform.ini");
|
||||
setBuildidMatchDontSendEnv();
|
||||
await forceCleanProcesses();
|
||||
let eventPromise = getEventPromise("oop-browser-crashed", "false-positive");
|
||||
|
|
|
|||
|
|
@ -1,56 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
// On debug builds, crashing tabs results in much thinking, which
|
||||
// slows down the test and results in intermittent test timeouts,
|
||||
// so we'll pump up the expected timeout for this test.
|
||||
requestLongerTimeout(2);
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
add_task(async function test_browser_restartrequired_event() {
|
||||
info("Waiting for oop-browser-buildid-mismatch event.");
|
||||
|
||||
Services.telemetry.clearScalars();
|
||||
is(
|
||||
getFalsePositiveTelemetry(),
|
||||
undefined,
|
||||
"Build ID mismatch false positive count should be undefined"
|
||||
);
|
||||
|
||||
ok(await ensureBuildID(), "System has correct platform.ini");
|
||||
|
||||
let profD = Services.dirsvc.get("GreD", Ci.nsIFile);
|
||||
let platformIniOrig = await IOUtils.readUTF8(
|
||||
PathUtils.join(profD.path, "platform.ini")
|
||||
);
|
||||
let buildID = Services.appinfo.platformBuildID;
|
||||
let platformIniNew = platformIniOrig.replace(buildID, "1234");
|
||||
|
||||
await IOUtils.writeUTF8(
|
||||
PathUtils.join(profD.path, "platform.ini"),
|
||||
platformIniNew,
|
||||
{ flush: true }
|
||||
);
|
||||
|
||||
setBuildidMatchDontSendEnv();
|
||||
await forceCleanProcesses();
|
||||
let eventPromise = getEventPromise(
|
||||
"oop-browser-buildid-mismatch",
|
||||
"buildid-mismatch"
|
||||
);
|
||||
let tab = await openNewTab(false);
|
||||
await eventPromise;
|
||||
await IOUtils.writeUTF8(
|
||||
PathUtils.join(profD.path, "platform.ini"),
|
||||
platformIniOrig,
|
||||
{ flush: true }
|
||||
);
|
||||
unsetBuildidMatchDontSendEnv();
|
||||
|
||||
is(
|
||||
getFalsePositiveTelemetry(),
|
||||
undefined,
|
||||
"Build ID mismatch false positive count should be undefined"
|
||||
);
|
||||
await closeTab(tab);
|
||||
});
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
"use strict";
|
||||
|
||||
// On debug builds, crashing tabs results in much thinking, which
|
||||
// slows down the test and results in intermittent test timeouts,
|
||||
// so we'll pump up the expected timeout for this test.
|
||||
requestLongerTimeout(2);
|
||||
|
||||
SimpleTest.expectChildProcessCrash();
|
||||
|
||||
add_task(async function test_browser_crashed_no_platform_ini_event() {
|
||||
info("Waiting for oop-browser-buildid-mismatch event.");
|
||||
|
||||
Services.telemetry.clearScalars();
|
||||
is(
|
||||
getFalsePositiveTelemetry(),
|
||||
undefined,
|
||||
"Build ID mismatch false positive count should be undefined"
|
||||
);
|
||||
|
||||
ok(await ensureBuildID(), "System has correct platform.ini");
|
||||
|
||||
let profD = Services.dirsvc.get("GreD", Ci.nsIFile);
|
||||
let platformIniOrig = await IOUtils.readUTF8(
|
||||
PathUtils.join(profD.path, "platform.ini")
|
||||
);
|
||||
|
||||
await IOUtils.remove(PathUtils.join(profD.path, "platform.ini"));
|
||||
|
||||
setBuildidMatchDontSendEnv();
|
||||
await forceCleanProcesses();
|
||||
let eventPromise = getEventPromise(
|
||||
"oop-browser-buildid-mismatch",
|
||||
"no-platform-ini"
|
||||
);
|
||||
let tab = await openNewTab(false);
|
||||
await eventPromise;
|
||||
await IOUtils.writeUTF8(
|
||||
PathUtils.join(profD.path, "platform.ini"),
|
||||
platformIniOrig,
|
||||
{ flush: true }
|
||||
);
|
||||
unsetBuildidMatchDontSendEnv();
|
||||
|
||||
is(
|
||||
getFalsePositiveTelemetry(),
|
||||
undefined,
|
||||
"Build ID mismatch false positive count should be undefined"
|
||||
);
|
||||
await closeTab(tab);
|
||||
});
|
||||
|
|
@ -10,13 +10,6 @@ prefs = [
|
|||
]
|
||||
|
||||
# Bug 1876056: remove once bug 1877361 is fixed
|
||||
|
||||
["browser_aboutRestartRequired_buildid_false-positive.js"]
|
||||
skip-if = ["win11_2009 && msix && debug"] # bug 1823581
|
||||
|
||||
# Bug 1888355: re-enable once bug 1877361 is fixed
|
||||
["browser_aboutRestartRequired_buildid_mismatch.js"]
|
||||
skip-if = ["win11_2009 && msix && debug"] # bug 1823581
|
||||
|
||||
# Bug 1888355: re-enable once bug 1877361 is fixed
|
||||
["browser_aboutRestartRequired_buildid_no-platform-ini.js"]
|
||||
skip-if = ["win11_2009 && msix && debug"] # bug 1823581
|
||||
|
|
|
|||
|
|
@ -171,15 +171,6 @@ function getEventPromise(eventName, eventKind) {
|
|||
});
|
||||
}
|
||||
|
||||
async function ensureBuildID() {
|
||||
let profD = Services.dirsvc.get("GreD", Ci.nsIFile);
|
||||
let platformIniOrig = await IOUtils.readUTF8(
|
||||
PathUtils.join(profD.path, "platform.ini")
|
||||
);
|
||||
let buildID = Services.appinfo.platformBuildID;
|
||||
return platformIniOrig.indexOf(buildID) > 0;
|
||||
}
|
||||
|
||||
async function openNewTab(forceCrash) {
|
||||
const PAGE =
|
||||
"data:text/html,<html><body>A%20regular,%20everyday,%20normal%20page.";
|
||||
|
|
|
|||
Loading…
Reference in a new issue