зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset b147830dc59e (bug 1505368) for devtools node failures. CLOSED TREE
This commit is contained in:
Родитель
24668051a3
Коммит
4b11d72042
|
@ -59,8 +59,6 @@ skip-if = (os == 'linux' && bits == 32) # ADB start() fails on linux 32, see Bug
|
|||
[browser_aboutdebugging_devtoolstoolbox_reload.js]
|
||||
[browser_aboutdebugging_devtoolstoolbox_shortcuts.js]
|
||||
skip-if = (os == "win" && ccov) # Bug 1521349
|
||||
[browser_aboutdebugging_devtoolstoolbox_target_destroyed.js]
|
||||
skip-if = debug || asan # This test leaks. See bug 1529005
|
||||
[browser_aboutdebugging_devtoolstoolbox_tooltip_markupview.js]
|
||||
[browser_aboutdebugging_navigate.js]
|
||||
[browser_aboutdebugging_persist_connection.js]
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
/* Any copyright is dedicated to the Public Domain.
|
||||
http://creativecommons.org/publicdomain/zero/1.0/ */
|
||||
|
||||
"use strict";
|
||||
|
||||
// Test that the expected supported categories are displayed for USB runtimes.
|
||||
add_task(async function() {
|
||||
const targetTab = await addTab("about:home");
|
||||
|
||||
const { document, tab, window } = await openAboutDebugging();
|
||||
|
||||
// go to This Firefox and inspect the new tab
|
||||
info("Inspecting a new tab in This Firefox");
|
||||
await selectThisFirefoxPage(document, window.AboutDebugging.store);
|
||||
const { devtoolsDocument, devtoolsTab, devtoolsWindow } =
|
||||
await openAboutDevtoolsToolbox(document, tab, window, "about:home");
|
||||
const targetInfoHeader = devtoolsDocument.querySelector(".js-debug-target-info");
|
||||
ok(targetInfoHeader.textContent.includes("about:home"),
|
||||
"about:devtools-toolbox is open for the target");
|
||||
|
||||
// close the inspected tab and check that error page is shown
|
||||
info("removing the inspected tab");
|
||||
await removeTab(targetTab);
|
||||
await waitUntil(() => devtoolsWindow.document.querySelector(".js-error-page"));
|
||||
|
||||
info("closing the toolbox");
|
||||
await removeTab(devtoolsTab);
|
||||
info("removing about:debugging tab");
|
||||
await removeTab(tab);
|
||||
});
|
|
@ -116,7 +116,7 @@ class DebugTargetInfo extends PureComponent {
|
|||
render() {
|
||||
return dom.header(
|
||||
{
|
||||
className: "debug-target-info js-debug-target-info",
|
||||
className: "debug-target-info",
|
||||
},
|
||||
this.shallRenderConnection() ? this.renderConnection() : null,
|
||||
this.renderRuntime(),
|
||||
|
|
|
@ -120,14 +120,7 @@ async function initToolbox(url, host) {
|
|||
|
||||
// Only use this method to attach the toolbox if some query parameters are given
|
||||
if (url.search.length > 1) {
|
||||
// show error page if 'disconnected' param appears in the querystring
|
||||
if (url.searchParams.has("disconnected")) {
|
||||
const error = new Error("Debug target was disconnected");
|
||||
showErrorPage(host.contentDocument, `${error}`);
|
||||
// otherwise, try to init the toolbox
|
||||
} else {
|
||||
initToolbox(url, host);
|
||||
}
|
||||
initToolbox(url, host);
|
||||
}
|
||||
// TODO: handle no params in about:devtool-toolbox
|
||||
// https://bugzilla.mozilla.org/show_bug.cgi?id=1526996
|
||||
|
|
|
@ -168,7 +168,6 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId,
|
|||
this._onInspectObject = this._onInspectObject.bind(this);
|
||||
this._onNewSelectedNodeFront = this._onNewSelectedNodeFront.bind(this);
|
||||
this._onToolSelected = this._onToolSelected.bind(this);
|
||||
this._onTargetClosed = this._onTargetClosed.bind(this);
|
||||
this.updateToolboxButtonsVisibility = this.updateToolboxButtonsVisibility.bind(this);
|
||||
this.updateToolboxButtons = this.updateToolboxButtons.bind(this);
|
||||
this.selectTool = this.selectTool.bind(this);
|
||||
|
@ -179,7 +178,7 @@ function Toolbox(target, selectedTool, hostType, contentWindow, frameId,
|
|||
this.toggleDragging = this.toggleDragging.bind(this);
|
||||
this.isPaintFlashing = false;
|
||||
|
||||
this._target.on("close", this._onTargetClosed);
|
||||
this._target.on("close", this.destroy);
|
||||
|
||||
if (!selectedTool) {
|
||||
selectedTool = Services.prefs.getCharPref(this._prefs.LAST_TOOL);
|
||||
|
@ -615,21 +614,6 @@ Toolbox.prototype = {
|
|||
return Object.assign({}, description, { connectionType });
|
||||
},
|
||||
|
||||
_onTargetClosed: async function() {
|
||||
const win = this.win; // .destroy() will set this.win to null
|
||||
|
||||
// clean up the toolbox
|
||||
this.destroy();
|
||||
// NOTE: we should await this.destroy() to ensure a proper clean up.
|
||||
// See https://bugzilla.mozilla.org/show_bug.cgi?id=1536144
|
||||
|
||||
// redirect to about:toolbox error page if we are connected to a remote
|
||||
// target and we lose it
|
||||
if (this.hostType === Toolbox.HostType.PAGE) {
|
||||
win.location.replace("about:devtools-toolbox?disconnected");
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* loading React modules when needed (to avoid performance penalties
|
||||
* during Firefox start up time).
|
||||
|
@ -3081,7 +3065,7 @@ Toolbox.prototype = {
|
|||
}
|
||||
const target = this._target;
|
||||
this._target = null;
|
||||
target.off("close", this._onTargetClosed);
|
||||
target.off("close", this.destroy);
|
||||
return target.destroy();
|
||||
}, console.error).then(() => {
|
||||
this.emit("destroyed");
|
||||
|
|
Загрузка…
Ссылка в новой задаче