Bug 1727323 - [devtools] Enable bfcache in parent in tests that have been fixed thanks to server targets. r=bomsy

All these tests most likely have been fixed with the enabling of server targets.
Because bfcache in parent was introducing more cross process navigations,
being initiated from the server, having the support of server targets was uterly
important to support bfcacheInParent.

Differential Revision: https://phabricator.services.mozilla.com/D123448
This commit is contained in:
Alexandre Poirot 2021-08-25 17:16:27 +00:00
parent f225d7e930
commit 3b693fede5
42 changed files with 0 additions and 258 deletions

View File

@ -16,12 +16,6 @@ const EMPTY_URL = (URL_ROOT + "resources/service-workers/empty.html").replace(
);
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await enableApplicationPanel();
const { panel, commands, tab } = await openNewTabAndApplicationPanel(

View File

@ -12,12 +12,6 @@ const SIMPLE_URL = URL_ROOT + "resources/service-workers/simple.html";
const OTHER_SCOPE_URL = URL_ROOT + "resources/service-workers/scope-page.html";
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await enableApplicationPanel();
const { panel, commands, tab } = await openNewTabAndApplicationPanel(

View File

@ -7,12 +7,6 @@
* It seems to cause different codepath compared to F5.
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const dbg = await initDebugger("doc-reload-link.html", "doc-reload-link.html");
const {
selectors: { getSelectedSource, getIsPaused, getCurrentThread },

View File

@ -5,12 +5,6 @@
// Test hovering in a script that is paused on load
// and doesn't have functions.
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const dbg = await initDebugger("doc-scripts.html");
const onNavigated = navigate(dbg, "doc-on-load.html");

View File

@ -8,12 +8,6 @@
// then removing and adding a watchpoint during the same pause
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const dbg = await initDebugger("doc-sources.html");
// Do not await for navigation as an early breakpoint pauses the document load

View File

@ -8,12 +8,6 @@ const EXAMPLE_NET_URI =
"http://example.net/document-builder.sjs?html=<div id=net>net";
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
info("Test with server side target switching ENABLED");
await pushPref("devtools.target-switching.server.enabled", true);
await testCase();

View File

@ -34,12 +34,6 @@ const OTHER_URI = `
ignoreGetGridsPromiseRejections();
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const { gridInspector, inspector } = await openLayoutView();
const { document: doc } = gridInspector;

View File

@ -33,12 +33,6 @@ const TEST_URI = `
ignoreGetGridsPromiseRejections();
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await pushPref("devtools.gridinspector.maxHighlighters", 3);
await addTab("data:text/html;charset=utf-8," + encodeURIComponent(TEST_URI));
const { gridInspector, inspector } = await openLayoutView();

View File

@ -49,12 +49,6 @@ const TEST_URL =
`);
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
info("Open the inspector to a blank page.");
const { inspector } = await openInspectorForURL("about:blank");

View File

@ -11,12 +11,6 @@ const TEST_URL_2 =
"data:text/html;charset=utf-8,<h1 style='color:red'>HTML test page</h1>";
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { inspector } = await openInspectorForURL(TEST_URL);
info("Check the inspector toolbar");

View File

@ -34,12 +34,6 @@ const TEST_URL =
"</html>";
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { inspector, tab } = await openInspectorForURL("about:blank");
const domContentLoaded = waitForLinkedBrowserEvent(tab, "DOMContentLoaded");

View File

@ -13,12 +13,6 @@ const EXPECTED_ELEMENT_IN_PARENT_PROCESS = "button";
const EXPECTED_ELEMENT_IN_CONTENT_PROCESS = "section";
add_task(async () => {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
info("Open the memory panel with empty page");
const tab = await addTab();
const { panel } = await openMemoryPanel(tab);

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { tab, monitor } = await initNetMonitor(SIMPLE_URL, {
requestCount: 1,
});

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
class DataTransfer {
constructor() {
this.BLOCKING_URL =

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { tab, monitor } = await initNetMonitor(SIMPLE_URL, {
requestCount: 1,
});

View File

@ -13,12 +13,6 @@ const CAUSE_URL = EXAMPLE_URL + CAUSE_FILE_NAME;
const N_EXPECTED_REQUESTS = 4;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
// the initNetMonitor function clears the network request list after the
// page is loaded. That's why we first load a bogus page from SIMPLE_URL,
// and only then load the real thing from CAUSE_URL - we want to catch

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -9,12 +9,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -9,12 +9,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { L10N } = require("devtools/client/netmonitor/src/utils/l10n");
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -7,12 +7,6 @@
* Test showing/hiding columns.
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -8,12 +8,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -10,12 +10,6 @@
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -133,12 +133,6 @@ const EXPECTED_REQUESTS = [
];
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
// the initNetMonitor function clears the network request list after the
// page is loaded. That's why we first load a bogus page from SIMPLE_URL,
// and only then load the real thing from INITIATOR_URL - we want to catch

View File

@ -9,12 +9,6 @@ const ALL_CHANNELS = Ci.nsITelemetry.DATASET_ALL_CHANNELS;
* Test the edit_resend telemetry event.
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -9,12 +9,6 @@ const ALL_CHANNELS = Ci.nsITelemetry.DATASET_ALL_CHANNELS;
* Test the filters_changed telemetry event.
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -9,12 +9,6 @@ const ALL_CHANNELS = Ci.nsITelemetry.DATASET_ALL_CHANNELS;
* Test the sidepanel_changed telemetry event.
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });
info("Starting test... ");

View File

@ -48,12 +48,6 @@ const EXPECTED_REQUESTS = {
};
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
// Load a different URL first to instantiate the network monitor before we
// load the page we're really interested in.
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -83,12 +83,6 @@ const EXPECTED_REQUESTS = [
];
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
// Load a different URL first to instantiate the network monitor before we
// load the page we're really interested in.
const { monitor } = await initNetMonitor(SIMPLE_URL, { requestCount: 1 });

View File

@ -13,12 +13,6 @@ const DUMMY_3_URL = "http://example.com/browser/devtools/";
addRDMTask(
null,
async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await SpecialPowers.pushPrefEnv({
set: [["browser.navigation.requireUserInteraction", false]],
});

View File

@ -10,12 +10,6 @@ const EMPTY_TEST_URL = TEST_BASE_HTTP + "doc_empty.html";
const TEST_URL = TEST_BASE_HTTP + "doc_fetch_from_netmonitor.html";
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
info("Opening netmonitor");
// Navigate first to an empty document in order to:
// * avoid introducing a cross process navigation when calling navigateTo()

View File

@ -33,12 +33,6 @@ const TEST_URI = `data:text/html;charset=utf-8,
<body>Autocomplete popup - invoke getter cache test</body>`;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const hud = await openNewTabAndConsole(TEST_URI);
const { jsterm } = hud;
const { autocompletePopup } = jsterm;

View File

@ -13,12 +13,6 @@ const TEST_URI1 = "http://example.com/" + BASE_URI;
const TEST_URI2 = "http://example.org/" + BASE_URI;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await pushPref("devtools.webconsole.persistlog", false);
const hud = await openNewTabAndConsole(TEST_URI1);

View File

@ -18,12 +18,6 @@ const TEST_URI = `data:text/html;charset=utf-8,<p>Web Console test for scroll.<
</script>
`;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const hud = await openNewTabAndConsole(TEST_URI);
const { ui } = hud;
const outputContainer = ui.outputNode.querySelector(".webconsole-output");

View File

@ -26,12 +26,6 @@ const PAGE_URL = `data:text/html,
</html>`;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
await pushPref("devtools.source-map.client-service.enabled", true);
await pushPref("devtools.webconsole.filter.css", true);

View File

@ -17,12 +17,6 @@ const TEST_URI =
const STUB_FILE = "cssMessage.js";
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const isStubsUpdate = env.get(STUBS_UPDATE_ENV) == "true";
info(`${isStubsUpdate ? "Update" : "Check"} ${STUB_FILE}`);

View File

@ -14,12 +14,6 @@
* an empty page.
*/
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
// Open a test tab
const tab = await addTab("data:text/html,Root Node tests");
@ -75,12 +69,6 @@ add_task(async function() {
* Test that the watchRootNode API provides the expected node fronts.
*/
add_task(async function testRootNodeFrontIsCorrect() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
const tab = await addTab("data:text/html,<div id=div1>");
const { client, resourceCommand, targetCommand } = await initResourceCommand(

View File

@ -8,12 +8,6 @@ const TEST_DOCUMENT = "target_configuration_test_doc.sjs";
const TEST_URI = URL_ROOT_COM_SSL + TEST_DOCUMENT;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
info("Setup the test page with workers of all types");
const tab = await addTab(TEST_URI);

View File

@ -8,12 +8,6 @@ const TEST_DOCUMENT = "target_configuration_test_doc.sjs";
const TEST_URI = URL_ROOT_COM_SSL + TEST_DOCUMENT;
add_task(async function() {
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({
set: [["fission.bfcacheInParent", false]],
});
// Disable click hold and double tap zooming as it might interfere with the test
await pushPref("ui.click_hold_context_menus", false);
await pushPref("apz.allow_double_tap_zooming", false);