Bug 679588 - Fix intermittent test timeout of browser_select_update.js, browser_select_confirm.js, and browser_select_selection.js. r=dtownsend

This commit is contained in:
Blair McBride 2011-12-07 23:48:44 +13:00
parent 6b792d8111
commit d2fdb7f5b3
3 changed files with 15 additions and 0 deletions

View File

@ -9,6 +9,11 @@ var gWin;
function waitForView(aView, aCallback) {
var view = gWin.document.getElementById(aView);
if (view.parentNode.selectedPanel == view) {
aCallback();
return;
}
view.addEventListener("ViewChanged", function() {
view.removeEventListener("ViewChanged", arguments.callee, false);
try {

View File

@ -59,6 +59,11 @@ var ADDONS = [
function waitForView(aView, aCallback) {
var view = gWin.document.getElementById(aView);
if (view.parentNode.selectedPanel == view) {
aCallback();
return;
}
view.addEventListener("ViewChanged", function() {
view.removeEventListener("ViewChanged", arguments.callee, false);
aCallback();

View File

@ -9,6 +9,11 @@ var gWin;
function waitForView(aView, aCallback) {
var view = gWin.document.getElementById(aView);
if (view.parentNode.selectedPanel == view) {
aCallback();
return;
}
view.addEventListener("ViewChanged", function() {
view.removeEventListener("ViewChanged", arguments.callee, false);
aCallback();