зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1645017 - Provide URL_ROOT variants for example.net, example.org r=ochameau
When testing fission scenarios in mochitests it can be useful to load test documents with different TLDs. Differential Revision: https://phabricator.services.mozilla.com/D80149
This commit is contained in:
Родитель
83e824f0c1
Коммит
f1c04a710c
|
@ -68,6 +68,31 @@ const URL_ROOT_SSL = CHROME_URL_ROOT.replace(
|
|||
"https://example.com/"
|
||||
);
|
||||
|
||||
// Add aliases which make it more explicit that URL_ROOT uses a com TLD.
|
||||
const URL_ROOT_COM = URL_ROOT;
|
||||
const URL_ROOT_COM_SSL = URL_ROOT_SSL;
|
||||
|
||||
// Also expose http://example.org, http://example.net, https://example.org to
|
||||
// test Fission scenarios easily.
|
||||
// Note: example.net is not available for https.
|
||||
const URL_ROOT_ORG = CHROME_URL_ROOT.replace(
|
||||
"chrome://mochitests/content/",
|
||||
"http://example.org/"
|
||||
);
|
||||
const URL_ROOT_ORG_SSL = CHROME_URL_ROOT.replace(
|
||||
"chrome://mochitests/content/",
|
||||
"https://example.org/"
|
||||
);
|
||||
const URL_ROOT_NET = CHROME_URL_ROOT.replace(
|
||||
"chrome://mochitests/content/",
|
||||
"http://example.org/"
|
||||
);
|
||||
// mochi.test:8888 is the actual primary location where files are served.
|
||||
const URL_ROOT_MOCHI_8888 = CHROME_URL_ROOT.replace(
|
||||
"chrome://mochitests/content/",
|
||||
"http://mochi.test:8888/"
|
||||
);
|
||||
|
||||
try {
|
||||
Services.scriptloader.loadSubScript(
|
||||
"chrome://mochitests/content/browser/devtools/client/shared/test/telemetry-test-helpers.js",
|
||||
|
|
|
@ -11,18 +11,10 @@
|
|||
const { TargetList } = require("devtools/shared/resources/target-list");
|
||||
const { TYPES } = TargetList;
|
||||
|
||||
const URL_ROOT_COM = CHROME_URL_ROOT.replace(
|
||||
"chrome://mochitests/content/",
|
||||
"https://example.com/"
|
||||
);
|
||||
const URL_ROOT_ORG = CHROME_URL_ROOT.replace(
|
||||
"chrome://mochitests/content/",
|
||||
"https://example.org/"
|
||||
);
|
||||
const COM_PAGE_URL = URL_ROOT_COM + "test_sw_page.html";
|
||||
const COM_WORKER_URL = URL_ROOT_COM + "test_sw_page_worker.js";
|
||||
const ORG_PAGE_URL = URL_ROOT_ORG + "test_sw_page.html";
|
||||
const ORG_WORKER_URL = URL_ROOT_ORG + "test_sw_page_worker.js";
|
||||
const COM_PAGE_URL = URL_ROOT_SSL + "test_sw_page.html";
|
||||
const COM_WORKER_URL = URL_ROOT_SSL + "test_sw_page_worker.js";
|
||||
const ORG_PAGE_URL = URL_ROOT_ORG_SSL + "test_sw_page.html";
|
||||
const ORG_WORKER_URL = URL_ROOT_ORG_SSL + "test_sw_page_worker.js";
|
||||
|
||||
/**
|
||||
* This test will navigate between two pages, both controlled by different
|
||||
|
|
Загрузка…
Ссылка в новой задаче