Bug 735151 - Intermittent browser_tilt_picking_highlight02.js | Highlighting a node didn't work properly and | an unexpected uncaught JS exception reported through window.onerror - this.treePanel is undefined at resource:///modules/inspector.jsm:478; r=rcampbell

This commit is contained in:
Victor Porof 2012-03-13 19:20:53 +02:00
parent 5ab472a7cc
commit 79cba78579
4 changed files with 8 additions and 8 deletions

View File

@ -44,6 +44,7 @@ function whenHighlighting() {
"Highlighting a node that's not already visible should trigger a reset!");
executeSoon(function() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.addObserver(whenUnhighlighting, UNHIGHLIGHTING, false);
presenter.highlightNode(null);
});
@ -56,14 +57,13 @@ function whenUnhighlighting() {
"After unhighlighting a node, it shouldn't be highlighted anymore. D'oh.");
executeSoon(function() {
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.addObserver(cleanup, DESTROYED, false);
InspectorUI.closeInspectorUI();
});
}
function cleanup() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.removeObserver(cleanup, DESTROYED);
gBrowser.removeCurrentTab();
finish();

View File

@ -43,6 +43,7 @@ function whenHighlighting() {
"Highlighting a node that's already visible shouldn't trigger a reset.");
executeSoon(function() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.addObserver(whenUnhighlighting, UNHIGHLIGHTING, false);
presenter.highlightNode(null);
});
@ -55,14 +56,13 @@ function whenUnhighlighting() {
"After unhighlighting a node, it shouldn't be highlighted anymore. D'oh.");
executeSoon(function() {
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.addObserver(cleanup, DESTROYED, false);
InspectorUI.closeInspectorUI();
});
}
function cleanup() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.removeObserver(cleanup, DESTROYED);
gBrowser.removeCurrentTab();
finish();

View File

@ -38,6 +38,7 @@ function whenHighlighting() {
"After highlighting a node, it should be highlighted. D'oh.");
executeSoon(function() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.addObserver(whenUnhighlighting, UNHIGHLIGHTING, false);
presenter.highlightNodeAt(-1, -1);
});
@ -50,14 +51,13 @@ function whenUnhighlighting() {
"After unhighlighting a node, it shouldn't be highlighted anymore. D'oh.");
executeSoon(function() {
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.addObserver(cleanup, DESTROYED, false);
InspectorUI.closeInspectorUI();
});
}
function cleanup() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.removeObserver(cleanup, DESTROYED);
gBrowser.removeCurrentTab();
finish();

View File

@ -38,6 +38,7 @@ function whenHighlighting() {
"After highlighting a node, it should be highlighted. D'oh.");
executeSoon(function() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.addObserver(whenUnhighlighting, UNHIGHLIGHTING, false);
presenter.highlightNodeFor(-1);
});
@ -50,14 +51,13 @@ function whenUnhighlighting() {
"After unhighlighting a node, it shouldn't be highlighted anymore. D'oh.");
executeSoon(function() {
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.addObserver(cleanup, DESTROYED, false);
InspectorUI.closeInspectorUI();
});
}
function cleanup() {
Services.obs.removeObserver(whenHighlighting, HIGHLIGHTING);
Services.obs.removeObserver(whenUnhighlighting, UNHIGHLIGHTING);
Services.obs.removeObserver(cleanup, DESTROYED);
gBrowser.removeCurrentTab();
finish();