Backed out changeset f650d9785940 (
bug 1501393) for ES linting failure at /builds/worker/checkouts/gecko/devtools/client/inspector/inspector.js. on a CLOSED TREE
--- a/devtools/client/accessibility/test/browser/browser_accessibility_context_menu_inspector.js
+++ b/devtools/client/accessibility/test/browser/browser_accessibility_context_menu_inspector.js
@@ -9,17 +9,16 @@ const TEST_URI = `
<span id="span-1">text</span>
<span id="span-2">
IamaverylongtextwhichdoesntfitinInlineTextChildReallyIdontIamtoobig
</span>`;
async function openContextMenuForNode({ toolbox }, selector) {
info("Selecting Inspector tab and opening a context menu");
const inspector = await toolbox.selectTool("inspector");
- await inspector._isMarkupLoaded;
if (!selector) {
ok(inspector.selection.isBodyNode(), "Default selection is a body node.");
} else if (typeof selector === "string") {
await selectNode(selector, inspector, "test");
} else {
const updated = inspector.once("inspector-updated");
inspector.selection.setNodeFront(selector, { reason: "test" });
--- a/devtools/client/inspector/inspector.js
+++ b/devtools/client/inspector/inspector.js
@@ -287,16 +287,20 @@ Inspector.prototype = {
// We can display right panel with: tab bar, markup view and breadbrumb. Right after
// the splitter set the right and left panel sizes, in order to avoid resizing it
// during load of the inspector.
this.panelDoc.getElementById("inspector-main-content").style.visibility = "visible";
// Setup the sidebar panels.
this.setupSidebar();
+ if (flags.testing) {
+ await this.once("markuploaded");
+ }
+
this.isReady = true;
// All the components are initialized. Take care of the remaining initialization
// and setup.
this.breadcrumbs = new HTMLBreadcrumbs(this);
this.setupExtensionSidebars();
this.setupSearchBox();
await this.setupToolbar();
@@ -1479,17 +1483,16 @@ Inspector.prototype = {
this.styleChangeTracker.destroy();
if (this.changesManager) {
this.changesManager.destroy();
}
this._is3PaneModeChromeEnabled = null;
this._is3PaneModeEnabled = null;
- this._isMarkupLoaded = null;
this._markupBox = null;
this._markupFrame = null;
this._notificationBox = null;
this._target = null;
this._toolbox = null;
this.breadcrumbs = null;
this.panelDoc = null;
this.panelWin.inspector = null;
@@ -1950,19 +1953,16 @@ Inspector.prototype = {
linkFollow.label = INSPECTOR_L10N.getFormatStr(
"inspector.menu.selectElement.label", popupNode.dataset.link);
}
return [linkFollow, linkCopy];
},
_initMarkup: function() {
- // This is used in accessibility tests to ensure the markup is loaded.
- this._isMarkupLoaded = this.once("markuploaded");
-
if (!this._markupFrame) {
this._markupFrame = this.panelDoc.createElement("iframe");
this._markupFrame.setAttribute("aria-label",
INSPECTOR_L10N.getStr("inspector.panelLabel.markupView"));
this._markupFrame.setAttribute("flex", "1");
// This is needed to enable tooltips inside the iframe document.
this._markupFrame.setAttribute("tooltip", "aHTMLTooltip");
this._markupFrame.addEventListener("contextmenu", this._onContextMenu);