Bug 1459398 - log a clear test failure if mandatory telemetry-test-helpers.js cannot be loaded;r=miker

MozReview-Commit-ID: KuMO6VeAfsw

--HG--
extra : rebase_source : c34968f0d45920ce03ce3e0228035bd7998ed708
This commit is contained in:
Julian Descottes 2018-05-05 12:49:39 +02:00
Родитель 6178168829
Коммит 58aba64766
2 изменённых файлов: 22 добавлений и 4 удалений

Просмотреть файл

@ -7,8 +7,17 @@
const { require, loader } = ChromeUtils.import("resource://devtools/shared/Loader.jsm", {});
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/devtools/client/shared/test/telemetry-test-helpers.js", this);
try {
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/devtools/client/shared/test/telemetry-test-helpers.js", this);
} catch (e) {
ok(false,
"MISSING DEPENDENCY ON telemetry-test-helpers.js\n" +
"Please add the following line in browser.ini:\n" +
" !/devtools/client/shared/test/telemetry-test-helpers.js\n"
);
throw e;
}
/* exported loader, either, click, dblclick, mousedown, rightMousedown, key */
// All tests are asynchronous.

Просмотреть файл

@ -39,8 +39,17 @@ const URL_ROOT = CHROME_URL_ROOT.replace("chrome://mochitests/content/",
const URL_ROOT_SSL = CHROME_URL_ROOT.replace("chrome://mochitests/content/",
"https://example.com/");
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/devtools/client/shared/test/telemetry-test-helpers.js", this);
try {
Services.scriptloader.loadSubScript(
"chrome://mochitests/content/browser/devtools/client/shared/test/telemetry-test-helpers.js", this);
} catch (e) {
ok(false,
"MISSING DEPENDENCY ON telemetry-test-helpers.js\n" +
"Please add the following line in browser.ini:\n" +
" !/devtools/client/shared/test/telemetry-test-helpers.js\n"
);
throw e;
}
// Force devtools to be initialized so menu items and keyboard shortcuts get installed
require("devtools/client/framework/devtools-browser");