Bug 1713670 - [devtools] Disable server targets in tests covering client targets. r=nchevobbe

target actor's will-navigate and navigate is no longer fired with server targets.
These two tests are still asserting them, so disable server target in these two tests.
We should probably remove them once we drop the server target preference (bug 1721852).

Differential Revision: https://phabricator.services.mozilla.com/D120947
This commit is contained in:
Alexandre Poirot 2021-07-27 15:10:34 +00:00
parent 335c9eb2f1
commit 2089c9ab98
4 changed files with 18 additions and 0 deletions

View File

@ -2,6 +2,11 @@
* http://creativecommons.org/publicdomain/zero/1.0/ */
add_task(async function() {
// Navigation events (navigate/will-navigate) on the target no longer fire with server targets.
// And as bfcache in parent introduce server target, they are also missing in this case.
// We should probably drop this test once we stop supporting client side targets (bug 1721852).
await pushPref("devtools.target-switching.server.enabled", false);
// Disable bfcache for Fission for now.
// If Fission is disabled, the pref is no-op.
await SpecialPowers.pushPrefEnv({

View File

@ -13,6 +13,11 @@ var { DevToolsClient } = require("devtools/client/devtools-client");
const TAB1_URL = EXAMPLE_URL + "doc_empty-tab-01.html";
add_task(async function test() {
// This test assert RDP APIs which were only meaningful when doing client side targets.
// Now that targets are all created by the Watcher, it is no longer meaningful to cover this.
// We should probably remove this test in bug 1721852.
await pushPref("devtools.target-switching.server.enabled", false);
DevToolsServer.init();
DevToolsServer.registerAllActors();

View File

@ -12,6 +12,10 @@ const TAB2_FILE = "doc_empty-tab-02.html";
const TAB2_URL = EXAMPLE_URL + TAB2_FILE;
add_task(async () => {
// Navigation events (navigate/will-navigate/tabNavigated) on the target no longer fire with server targets.
// We should probably drop this test once we stop supporting client side targets (bug 1721852).
await pushPref("devtools.target-switching.server.enabled", false);
const tab = await addTab(TAB1_URL);
const target = await createAndAttachTargetForTab(tab);

View File

@ -121,6 +121,10 @@ async function connectAndAttachTab(tab) {
}
add_task(async function() {
// Navigation events (navigate/will-navigate) on the target no longer fire with server targets.
// We should probably drop this test once we stop supporting client side targets (bug 1721852).
await pushPref("devtools.target-switching.server.enabled", false);
// Open a test tab
const browser = await addTab(URL1);