mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 980835 - Fix for intermittent | browser_webconsole_output_dom_elements_02.js | The current inspector selection is correct - Got [object HTMLParagraphElement], expected [object HTMLBodyElement]; r=me
This commit is contained in:
parent
7ebdc14a3b
commit
e429f95666
@ -90,6 +90,10 @@ exports.RuleViewTool = RuleViewTool;
|
||||
|
||||
RuleViewTool.prototype = {
|
||||
onSelect: function RVT_onSelect(aEvent) {
|
||||
if (!this.view) {
|
||||
// Skip the event if RuleViewTool has been destroyed.
|
||||
return;
|
||||
}
|
||||
this.view.setPageStyle(this.inspector.pageStyle);
|
||||
|
||||
if (!this.inspector.selection.isConnected() ||
|
||||
@ -158,6 +162,10 @@ exports.ComputedViewTool = ComputedViewTool;
|
||||
ComputedViewTool.prototype = {
|
||||
onSelect: function CVT_onSelect(aEvent)
|
||||
{
|
||||
if (!this.view) {
|
||||
// Skip the event if ComputedViewTool has been destroyed.
|
||||
return;
|
||||
}
|
||||
this.view.setPageStyle(this.inspector.pageStyle);
|
||||
|
||||
if (!this.inspector.selection.isConnected() ||
|
||||
|
@ -524,6 +524,7 @@ Messages.BaseMessage.prototype = {
|
||||
for (let widget of this.widgets) {
|
||||
widget.destroy();
|
||||
}
|
||||
this.widgets.clear();
|
||||
}
|
||||
}; // Messages.BaseMessage.prototype
|
||||
|
||||
|
@ -38,8 +38,9 @@ function test() {
|
||||
|
||||
// Loading the inspector panel at first, to make it possible to listen for
|
||||
// new node selections
|
||||
yield toolbox.loadTool("inspector");
|
||||
let inspector = toolbox.getPanel("inspector");
|
||||
yield toolbox.selectTool("inspector");
|
||||
let inspector = toolbox.getCurrentPanel();
|
||||
yield toolbox.selectTool("webconsole");
|
||||
|
||||
info("Iterating over the test data");
|
||||
for (let data of TEST_DATA) {
|
||||
@ -60,7 +61,7 @@ function test() {
|
||||
ok(true, "Inspector selected and new node got selected");
|
||||
|
||||
let rawNode = content.wrappedJSObject[data.input.replace(/\(\)/g, "")]();
|
||||
is(rawNode, inspector.selection.node.wrappedJSObject,
|
||||
is(inspector.selection.node.wrappedJSObject, rawNode,
|
||||
"The current inspector selection is correct");
|
||||
|
||||
info("Switching back to the console");
|
||||
|
Loading…
Reference in New Issue
Block a user