зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1763193 - Add TestUtils.assertOnPackagedBuild and use it on browser_all_files_referenced.js etc. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D162441
This commit is contained in:
Родитель
4881c17cf0
Коммит
db580e9805
|
@ -246,18 +246,7 @@ add_task(async function() {
|
|||
return;
|
||||
}
|
||||
|
||||
{
|
||||
let omniJa = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
|
||||
omniJa.append("omni.ja");
|
||||
if (!omniJa.exists()) {
|
||||
ok(
|
||||
false,
|
||||
"This test requires a packaged build, " +
|
||||
"run 'mach package' and then use --appname=dist"
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
TestUtils.assertPackagedBuild();
|
||||
|
||||
let startupRecorder = Cc["@mozilla.org/test/startuprecorder;1"].getService()
|
||||
.wrappedJSObject;
|
||||
|
|
|
@ -607,18 +607,7 @@ add_task(async function() {
|
|||
return;
|
||||
}
|
||||
|
||||
{
|
||||
let omniJa = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
|
||||
omniJa.append("omni.ja");
|
||||
if (!omniJa.exists()) {
|
||||
ok(
|
||||
false,
|
||||
"This test requires a packaged build, " +
|
||||
"run 'mach package' and then use --appname=dist"
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
TestUtils.assertPackagedBuild();
|
||||
|
||||
let startupRecorder = Cc["@mozilla.org/test/startuprecorder;1"].getService()
|
||||
.wrappedJSObject;
|
||||
|
|
|
@ -805,6 +805,8 @@ function findChromeUrlsFromArray(array, prefix) {
|
|||
}
|
||||
|
||||
add_task(async function checkAllTheFiles() {
|
||||
TestUtils.assertPackagedBuild();
|
||||
|
||||
const libxul = await IOUtils.read(PathUtils.xulLibraryPath);
|
||||
findChromeUrlsFromArray(libxul, "chrome://");
|
||||
findChromeUrlsFromArray(libxul, "resource://");
|
||||
|
|
|
@ -341,4 +341,15 @@ export var TestUtils = {
|
|||
}
|
||||
return results;
|
||||
},
|
||||
|
||||
assertPackagedBuild() {
|
||||
const omniJa = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
|
||||
omniJa.append("omni.ja");
|
||||
if (!omniJa.exists()) {
|
||||
throw new Error(
|
||||
"This test requires a packaged build, " +
|
||||
"run 'mach package' and then use --appname=dist"
|
||||
);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
@ -185,18 +185,7 @@ function getStackFromProfile(profile, stack, libs) {
|
|||
}
|
||||
|
||||
add_task(async function test_xpcom_graph_wait() {
|
||||
{
|
||||
let omniJa = Services.dirsvc.get("XCurProcD", Ci.nsIFile);
|
||||
omniJa.append("omni.ja");
|
||||
if (!omniJa.exists()) {
|
||||
ok(
|
||||
false,
|
||||
"This test requires a packaged build, " +
|
||||
"run 'mach package' and then use --appname=dist"
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
TestUtils.assertPackagedBuild();
|
||||
|
||||
let profilePath = Cc["@mozilla.org/process/environment;1"]
|
||||
.getService(Ci.nsIEnvironment)
|
||||
|
|
Загрузка…
Ссылка в новой задаче