mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1161072 - Ensure webconsole test do have pending request on test end. r=pbrosset
This commit is contained in:
parent
d51ccd66b7
commit
d9cecc6e42
@ -3160,6 +3160,12 @@ Widgets.ObjectRenderers.add({
|
||||
"message was got cleared away");
|
||||
}
|
||||
|
||||
// Check it again as this method is async!
|
||||
if (this._linkedToInspector) {
|
||||
return;
|
||||
}
|
||||
this._linkedToInspector = true;
|
||||
|
||||
this.highlightDomNode = this.highlightDomNode.bind(this);
|
||||
this.element.addEventListener("mouseover", this.highlightDomNode, false);
|
||||
this.unhighlightDomNode = this.unhighlightDomNode.bind(this);
|
||||
@ -3170,8 +3176,6 @@ Widgets.ObjectRenderers.add({
|
||||
onClick: this.openNodeInInspector.bind(this)
|
||||
});
|
||||
this._openInspectorNode.title = l10n.getStr("openNodeInInspector");
|
||||
|
||||
this._linkedToInspector = true;
|
||||
}),
|
||||
|
||||
/**
|
||||
|
@ -62,11 +62,13 @@ function test() {
|
||||
let onInspectorSelected = toolbox.once("inspector-selected");
|
||||
let onInspectorUpdated = inspector.once("inspector-updated");
|
||||
let onNewNode = toolbox.selection.once("new-node-front");
|
||||
let onNodeHighlight = toolbox.once("node-highlight");
|
||||
|
||||
EventUtils.synthesizeMouseAtCenter(inspectorIcon, {},
|
||||
inspectorIcon.ownerDocument.defaultView);
|
||||
yield onInspectorSelected;
|
||||
yield onInspectorUpdated;
|
||||
yield onNodeHighlight;
|
||||
let nodeFront = yield onNewNode;
|
||||
|
||||
ok(true, "Inspector selected and new node got selected");
|
||||
@ -79,6 +81,13 @@ function test() {
|
||||
is(attrs[i].value, data.attrs[i].value, "The correct node was highlighted");
|
||||
}
|
||||
|
||||
info("Unhighlight the node by moving away from the markup view");
|
||||
let onNodeUnhighlight = toolbox.once("node-unhighlight");
|
||||
let btn = inspector.toolbox.doc.querySelector(".toolbox-dock-button");
|
||||
EventUtils.synthesizeMouseAtCenter(btn, {type: "mousemove"},
|
||||
inspector.toolbox.doc.defaultView);
|
||||
yield onNodeUnhighlight;
|
||||
|
||||
info("Switching back to the console");
|
||||
yield toolbox.selectTool("webconsole");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user