Backed out changeset f650d9785940 (bug 1501393) for ES linting failure at /builds/worker/checkouts/gecko/devtools/client/inspector/inspector.js. on a CLOSED TREE
authorDaniel Varga <dvarga@mozilla.com>
Thu, 25 Oct 2018 18:50:52 +0300
changeset 491298 f93013d0b826fb2377fd5fa4f5b9abec8e03fb1e
parent 491297 f650d97859402d9d0787907e514da3592f0960ca
child 491319 6d5587e42c0c5812bb38e33219b6c36555cd3494
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
bugs1501393
milestone65.0a1
backs outf650d97859402d9d0787907e514da3592f0960ca
Backed out changeset f650d9785940 (bug 1501393) for ES linting failure at /builds/worker/checkouts/gecko/devtools/client/inspector/inspector.js. on a CLOSED TREE
devtools/client/accessibility/test/browser/browser_accessibility_context_menu_inspector.js
devtools/client/inspector/inspector.js
--- 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);