Created
March 5, 2018 19:15
-
-
Save juliandescottes/5cf11dd6d87b616343b0c67b8791e575 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# HG changeset patch | |
# User Julian Descottes <[email protected]> | |
# Date 1520277297 -3600 | |
# Mon Mar 05 20:14:57 2018 +0100 | |
# Node ID cc20e5c6b4cb54dde9fa3362afc46a45a7990f21 | |
# Parent 8109be9a13aca79b3f4bf22dd2847b24ad820f52 | |
WIP - wait for grid panel update before starting layoutview tests | |
MozReview-Commit-ID: 3RWpI1pbsj9 | |
diff --git a/devtools/client/inspector/grids/grid-inspector.js b/devtools/client/inspector/grids/grid-inspector.js | |
--- a/devtools/client/inspector/grids/grid-inspector.js | |
+++ b/devtools/client/inspector/grids/grid-inspector.js | |
@@ -348,16 +348,17 @@ class GridInspector { | |
gridFragments: grid.gridFragments, | |
highlighted: nodeFront == this.highlighters.gridHighlighterShown, | |
nodeFront, | |
writingMode: grid.writingMode, | |
}); | |
} | |
this.store.dispatch(updateGrids(grids)); | |
+ this.inspector.emit("grid-panel-updated"); | |
} | |
/** | |
* Handler for "grid-highlighter-shown" and "grid-highlighter-hidden" events emitted | |
* from the HighlightersOverlay. Updates the NodeFront's grid highlighted state. | |
* | |
* @param {Event} event | |
* Event that was triggered. | |
diff --git a/devtools/client/inspector/test/shared-head.js b/devtools/client/inspector/test/shared-head.js | |
--- a/devtools/client/inspector/test/shared-head.js | |
+++ b/devtools/client/inspector/test/shared-head.js | |
@@ -49,18 +49,22 @@ var openInspectorSidebarTab = Task.async | |
let {toolbox, inspector, testActor} = yield openInspector(); | |
info("Selecting the " + id + " sidebar"); | |
let onSidebarSelect = inspector.sidebar.once("select"); | |
if (id === "computedview" || id === "layoutview") { | |
// The layout and computed views should wait until the box-model widget is ready. | |
let onBoxModelViewReady = inspector.once("boxmodel-view-updated"); | |
+ // The layout view also needs to wait for the grid panel to be fully updated. | |
+ let onGridPanelReady = id === "layoutview" ? | |
+ inspector.once("grid-panel-updated") : Promise.resolve(); | |
inspector.sidebar.select(id); | |
yield onBoxModelViewReady; | |
+ yield onGridPanelReady; | |
} else { | |
inspector.sidebar.select(id); | |
} | |
yield onSidebarSelect; | |
return { | |
toolbox, | |
inspector, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment