зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1605347 - Explicitly test both values for devtools.browsertoolbox.fission in browser_aboutdebugging_process_main.js r=daisuke
Setting the values for the pref explicitly will make the test run in the same way regardless of the channel (this pref is true on Nightly only at the moment) Differential Revision: https://phabricator.services.mozilla.com/D57966 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
bdd5623ab2
Коммит
65922f5297
|
@ -9,15 +9,32 @@ Services.scriptloader.loadSubScript(
|
|||
this
|
||||
);
|
||||
|
||||
const MAIN_PROCESS_NAME = "Multiprocess Toolbox";
|
||||
const MAIN_PROCESS_NAME = "Main Process";
|
||||
const MAIN_PROCESS_DESCRIPTION = "Main Process for the target browser";
|
||||
const MULTIPROCESS_TOOLBOX_NAME = "Multiprocess Toolbox";
|
||||
const MULTIPROCESS_TOOLBOX_DESCRIPTION =
|
||||
"Main Process and Content Processes for the target browser";
|
||||
|
||||
const RUNTIME_ID = "test-runtime-id";
|
||||
const RUNTIME_DEVICE_NAME = "test device name";
|
||||
const RUNTIME_APP_NAME = "TestApp";
|
||||
|
||||
// Test for main process.
|
||||
add_task(async function() {
|
||||
await pushPref("devtools.aboutdebugging.process-debugging", true);
|
||||
info("Test the regular main process target");
|
||||
await pushPref("devtools.browsertoolbox.fission", false);
|
||||
await testMainProcessTarget(MAIN_PROCESS_NAME, MAIN_PROCESS_DESCRIPTION);
|
||||
|
||||
info("Test the main process target with devtools.browsertoolbox.fission");
|
||||
await pushPref("devtools.browsertoolbox.fission", true);
|
||||
await testMainProcessTarget(
|
||||
MULTIPROCESS_TOOLBOX_NAME,
|
||||
MULTIPROCESS_TOOLBOX_DESCRIPTION
|
||||
);
|
||||
});
|
||||
|
||||
async function testMainProcessTarget(name, description) {
|
||||
await pushPref("devtools.aboutdebugging.process-debugging", true);
|
||||
const mocks = new Mocks();
|
||||
|
||||
const { document, tab, window } = await openAboutDebugging();
|
||||
|
@ -36,12 +53,10 @@ add_task(async function() {
|
|||
await selectRuntime(RUNTIME_DEVICE_NAME, RUNTIME_APP_NAME, document);
|
||||
|
||||
info("Check debug target item of the main process");
|
||||
const mainProcessItem = findDebugTargetByText(MAIN_PROCESS_NAME, document);
|
||||
const mainProcessItem = findDebugTargetByText(name, document);
|
||||
ok(mainProcessItem, "Debug target item of the main process should display");
|
||||
ok(
|
||||
mainProcessItem.textContent.includes(
|
||||
"Main Process and Content Processes for the target browser"
|
||||
),
|
||||
mainProcessItem.textContent.includes(description),
|
||||
"Debug target item of the main process should contains the description"
|
||||
);
|
||||
|
||||
|
@ -50,7 +65,7 @@ add_task(async function() {
|
|||
document,
|
||||
tab,
|
||||
window,
|
||||
MAIN_PROCESS_NAME,
|
||||
name,
|
||||
false
|
||||
);
|
||||
|
||||
|
@ -70,4 +85,4 @@ add_task(async function() {
|
|||
await removeTab(devtoolsTab);
|
||||
await waitUntil(() => !findDebugTargetByText("Toolbox - ", document));
|
||||
await removeTab(tab);
|
||||
});
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче