зеркало из https://github.com/mozilla/pjs.git
Bug 542928 - Add some more debugging logs to waitForFocus in order to track down the browser-chrome random orange; r=enndeakin
This commit is contained in:
Родитель
a63234bb3d
Коммит
e9dbf69d65
|
@ -298,15 +298,22 @@ SimpleTest.waitForFocus = function (callback, targetWindow, expectBlankPage) {
|
|||
}
|
||||
|
||||
function waitForEvent(event) {
|
||||
// Check to make sure that this isn't a load event for a blank or
|
||||
// non-blank page that wasn't desired.
|
||||
if (event.type == "load" && (expectBlankPage != (event.target.location == "about:blank")))
|
||||
return;
|
||||
try {
|
||||
debugFocusLog("waitForEvent called <type:" + event.type + ", target" + event.target + ">");
|
||||
|
||||
SimpleTest["waitForFocus_" + event.type + "ed"] = true;
|
||||
var win = (event.type == "load") ? targetWindow : childTargetWindow;
|
||||
win.removeEventListener(event.type, waitForEvent, true);
|
||||
maybeRunTests();
|
||||
// Check to make sure that this isn't a load event for a blank or
|
||||
// non-blank page that wasn't desired.
|
||||
if (event.type == "load" && (expectBlankPage != (event.target.location == "about:blank")))
|
||||
return;
|
||||
|
||||
SimpleTest["waitForFocus_" + event.type + "ed"] = true;
|
||||
var win = (event.type == "load") ? targetWindow : childTargetWindow;
|
||||
win.removeEventListener(event.type, waitForEvent, true);
|
||||
maybeRunTests();
|
||||
} catch (e) {
|
||||
SimpleTest.ok(false, "Exception caught in waitForEvent: " + e.message +
|
||||
", at: " + e.fileName + " (" + e.lineNumber + ")");
|
||||
}
|
||||
}
|
||||
|
||||
// If the current document is about:blank and we are not expecting a blank
|
||||
|
|
Загрузка…
Ссылка в новой задаче