Bug 1782527 - [devtools] Change devtools.chrome-debug-mode default value to parent-process. r=jdescottes.

Differential Revision: https://phabricator.services.mozilla.com/D153432
This commit is contained in:
Nicolas Chevobbe 2022-08-04 07:42:33 +00:00
Родитель 71cb284f5f
Коммит 86f24f5938
42 изменённых файлов: 62 добавлений и 6 удалений

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

@ -2296,7 +2296,7 @@ pref("devtools.browsertoolbox.fission", true);
// All processes, all documents, all workers, all add-ons.
// - "parent-process" will restrict debugging to the parent process
// All privileged javascript, documents and workers running in the parent process.
pref("devtools.browsertoolbox.scope", "everything");
pref("devtools.browsertoolbox.scope", "parent-process");
// This preference will enable watching top-level targets from the server side.
pref("devtools.target-switching.server.enabled", true);

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

@ -17,6 +17,7 @@ Services.scriptloader.loadSubScript(
add_task(async function() {
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Make sure the toolbox opens with the webconsole initially selected.
await pushPref("devtools.browsertoolbox.panel", "webconsole");

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

@ -17,6 +17,7 @@ Services.scriptloader.loadSubScript(
add_task(async function() {
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await pushPref("dom.serviceWorkers.enabled", true);
await pushPref("dom.serviceWorkers.testing.enabled", true);

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

@ -22,6 +22,7 @@ Services.scriptloader.loadSubScript(
add_task(async function testSourceTreeNamesForWebExtensions() {
await pushPref("devtools.chrome.enabled", true);
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
const extension = await installAndStartContentScriptExtension();
const dbg = await initDebugger("doc-content-script-sources.html");

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

@ -30,6 +30,8 @@ add_task(async function runTest() {
""
);
await pushPref("devtools.browsertoolbox.scope", "everything");
const ToolboxTask = await initBrowserToolboxTask({
enableBrowserToolboxFission: true,
});

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

@ -22,6 +22,8 @@ add_task(async function() {
await pushPref("devtools.webconsole.input.context", true);
// Force EFT to have targets for all WindowGlobals
await pushPref("devtools.every-frame-target.enabled", true);
// Enable Multiprocess Browser Toolbox
await pushPref("devtools.browsertoolbox.scope", "everything");
// Open the test *before* opening the Browser toolbox in order to have the right target title.
// Once created, the target won't update its title, and so would be "New Tab", instead of "Test tab"

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

@ -24,6 +24,7 @@ requestLongerTimeout(4);
* test locally.
*/
add_task(async function() {
await pushPref("devtools.browsertoolbox.scope", "everything");
const ToolboxTask = await initBrowserToolboxTask({
enableBrowserToolboxFission: true,
});

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

@ -23,6 +23,8 @@ requestLongerTimeout(4);
add_task(async function() {
// Forces the Browser Toolbox to open on the inspector by default
await pushPref("devtools.browsertoolbox.panel", "inspector");
// Enable Multiprocess Browser Toolbox
await pushPref("devtools.browsertoolbox.scope", "everything");
const ToolboxTask = await initBrowserToolboxTask({
enableBrowserToolboxFission: true,

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

@ -58,6 +58,8 @@ add_task(async function() {
// Forces the Browser Toolbox to open on the inspector by default
await pushPref("devtools.browsertoolbox.panel", "inspector");
// Enable Multiprocess Browser Toolbox
await pushPref("devtools.browsertoolbox.scope", "everything");
const ToolboxTask = await initBrowserToolboxTask({
enableBrowserToolboxFission: true,
});

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

@ -23,6 +23,9 @@ add_task(async function() {
// Forces the Browser Toolbox to open on the inspector by default
await pushPref("devtools.browsertoolbox.panel", "inspector");
// Enable Multiprocess Browser Toolbox
await pushPref("devtools.browsertoolbox.scope", "everything");
// Open the tab *after* opening the Browser Toolbox in order to force creating the remote frames
// late and exercise frame target watching code.
await addTab(`data:text/html,<div id="test-div">PRINT PREVIEW TEST</div>`);

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

@ -22,6 +22,8 @@ requestLongerTimeout(4);
add_task(async function() {
// Forces the Browser Toolbox to open on the inspector by default
await pushPref("devtools.browsertoolbox.panel", "inspector");
// Enable Multiprocess Browser Toolbox
await pushPref("devtools.browsertoolbox.scope", "everything");
const ToolboxTask = await initBrowserToolboxTask({
enableBrowserToolboxFission: true,

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

@ -24,6 +24,7 @@ requestLongerTimeout(4);
add_task(async function() {
// Forces the Browser Toolbox to open on the inspector by default
await pushPref("devtools.browsertoolbox.panel", "inspector");
await pushPref("devtools.browsertoolbox.scope", "everything");
const tab = await addTab(
"https://example.com/document-builder.sjs?html=<div id=pick-me>Pickme"

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

@ -19,6 +19,7 @@ add_task(async function() {
"devtools.browsertoolbox.fission",
false
);
await pushPref("devtools.browsertoolbox.scope", "everything");
const topWindow = Services.wm.getMostRecentWindow("navigator:browser");
is(

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

@ -48,6 +48,9 @@ add_task(async function() {
await SpecialPowers.pushPrefEnv({
set: [["devtools.browsertoolbox.fission", true]],
});
await SpecialPowers.pushPrefEnv({
set: [["devtools.browsertoolbox.scope", "everything"]],
});
const tab = await addTab(TEST_URL);

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

@ -24,6 +24,7 @@ Services.scriptloader.loadSubScript(
add_task(async function() {
await addTab(TEST_URI);
await pushPref("devtools.browsertoolbox.scope", "everything");
const ToolboxTask = await initBrowserToolboxTask({
enableBrowserToolboxFission: true,
});

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

@ -38,6 +38,7 @@ add_task(async function() {
info(
"Check browser console messages with devtools.browsertoolbox.fission set to true"
);
await pushPref("devtools.browsertoolbox.scope", "everything");
await pushPref("devtools.browsertoolbox.fission", true);
await testMessages();

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

@ -12,6 +12,7 @@ const TEST_URI =
add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);
let hud = await BrowserConsoleManager.toggleBrowserConsole();

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

@ -14,6 +14,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Disable the preloaded process as it creates processes intermittently
// which forces the emission of RDP requests we aren't correctly waiting for.

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

@ -13,6 +13,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);

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

@ -18,6 +18,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);

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

@ -15,6 +15,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);

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

@ -18,6 +18,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);

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

@ -25,6 +25,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);

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

@ -11,6 +11,7 @@ const TEST_URI =
add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Enable net messages in the console for this test.
await pushPref("devtools.browserconsole.filter.net", true);
// This is required for testing the text input in the browser console:

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

@ -15,6 +15,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);

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

@ -14,6 +14,14 @@ add_task(async function() {
// which forces the emission of RDP requests we aren't correctly waiting for.
await pushPref("dom.ipc.processPrelaunch.enabled", false);
const isFissionEnabledForBrowserConsole = Services.prefs.getBoolPref(
"devtools.browsertoolbox.fission",
false
);
if (isFissionEnabledForBrowserConsole) {
await pushPref("devtools.browsertoolbox.scope", "everything");
}
const wcHud = await openNewTabAndConsole(TEST_URI);
ok(wcHud, "web console opened");
@ -57,11 +65,6 @@ add_task(async function() {
ok(url.includes("toolbox.js"), "we have the expected view source URL");
ok(!url.includes("->"), "no -> in the URL given to view-source");
const isFissionEnabledForBrowserConsole = Services.prefs.getBoolPref(
"devtools.browsertoolbox.fission",
false
);
const { targetCommand } = bcHud.commands;
// If Fission is not enabled for the Browser Console (e.g. in Beta at this moment),
// the target list won't watch for Frame targets, and as a result we won't have issues

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

@ -16,6 +16,7 @@ add_task(async function() {
await pushPref("dom.ipc.processPrelaunch.enabled", false);
await pushPref("devtools.browserconsole.contentMessages", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);
const hud = await BrowserConsoleManager.toggleBrowserConsole();

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

@ -9,6 +9,7 @@ add_task(async function() {
await pushPref("devtools.chrome.enabled", true);
await pushPref("devtools.every-frame-target.enabled", true);
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
const hud = await BrowserConsoleManager.toggleBrowserConsole();

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

@ -18,6 +18,7 @@ add_task(async function() {
// Show the content messages
await pushPref("devtools.browserconsole.contentMessages", true);
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
info("Open the Browser Console");
const hud = await BrowserConsoleManager.toggleBrowserConsole();

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

@ -38,6 +38,7 @@ add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
// Enable Fission browser console to see the logged content object
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
hud = await BrowserConsoleManager.toggleBrowserConsole();
ok(hud, "browser console opened");
await testMessages(hud);

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

@ -32,6 +32,7 @@ add_task(async function() {
await testBrowserConsole(publicTab);
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await testBrowserConsole(publicTab);
});

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

@ -12,6 +12,7 @@ const TEST_URI =
add_task(async function() {
await pushPref("devtools.browserconsole.contentMessages", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
await addTab(TEST_URI);
info("Check with devtools.browsertoolbox.fission set to false");

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

@ -31,6 +31,9 @@ add_task(async function() {
await pushPref("devtools.webconsole.input.editor", true);
await pushPref("devtools.browserconsole.input.editor", true);
// Enable Multiprocess Browser Console
await pushPref("devtools.browsertoolbox.scope", "everything");
// Needed for the execute() function below
await pushPref("security.allow_parent_unrestricted_js_loads", true);

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

@ -10,6 +10,7 @@ const TEST_URL = URL_ROOT_SSL + "early_console_document.html";
add_task(async function() {
// Enable Multiprocess Browser Toolbox (it's still disabled for non-Nightly builds).
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
const {
client,

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

@ -13,6 +13,7 @@ add_task(async function() {
// devtools.browsertoolbox.fission should be true to monitor resources from
// remote browsers & frames.
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Open a test tab
const tab = await addTab("data:text/html,Root Node tests");

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

@ -499,6 +499,7 @@ async function testIframeNavigations() {
1,
"Without fission/EFT, there is only the top level target"
);
await commands.destroy();
return;
}
is(targets.length, 2, "retrieved the top level and the iframe targets");

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

@ -13,6 +13,7 @@ const SERVICE_WORKER_URL = URL_ROOT_SSL + "test_service_worker.js";
add_task(async function() {
// Enabled fission's pref as the TargetCommand is almost disabled without it
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Disable the preloaded process as it creates processes intermittently
// which forces the emission of RDP requests we aren't correctly waiting for.

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

@ -20,6 +20,7 @@ add_task(async function() {
// Enabled fission prefs
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Disable the preloaded process as it gets created lazily and may interfere
// with process count assertions
await pushPref("dom.ipc.processPrelaunch.enabled", false);

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

@ -11,6 +11,7 @@ const TEST_URL =
add_task(async function() {
// Enabled fission's pref as the TargetCommand is almost disabled without it
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Disable the preloaded process as it gets created lazily and may interfere
// with process count assertions
await pushPref("dom.ipc.processPrelaunch.enabled", false);

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

@ -128,4 +128,7 @@ add_task(async function() {
iframeWorkerTargetAfterGoingBack,
"The target list handled the worker created in the iframe from the BF Cache"
);
targetCommand.destroy();
await commands.destroy();
});

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

@ -12,6 +12,7 @@ const CHROME_WORKER_URL = CHROME_URL_ROOT + "test_worker.js";
add_task(async function() {
// Enabled fission prefs
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Disable the preloaded process as it gets created lazily and may interfere
// with process count assertions
await pushPref("dom.ipc.processPrelaunch.enabled", false);

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

@ -11,6 +11,7 @@ const TEST_URL =
add_task(async function() {
// Enabled fission's pref as the TargetCommand is almost disabled without it
await pushPref("devtools.browsertoolbox.fission", true);
await pushPref("devtools.browsertoolbox.scope", "everything");
// Disable the preloaded process as it gets created lazily and may interfere
// with process count assertions
await pushPref("dom.ipc.processPrelaunch.enabled", false);