зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1254988, remove correct listener in waitForFocus, r=jmaher
This commit is contained in:
Родитель
877969d5e0
Коммит
895e698fb9
|
@ -792,7 +792,7 @@ SimpleTest.waitForFocus = function (callback, targetWindow, expectBlankPage) {
|
|||
if (isChildProcess) {
|
||||
/* This message is used when an inner child frame must be focused. */
|
||||
addMessageListener("WaitForFocus:FocusChild", function focusChild(msg) {
|
||||
removeMessageListener("WaitForFocus:ChildFocused", focusChild);
|
||||
removeMessageListener("WaitForFocus:FocusChild", focusChild);
|
||||
finished = false;
|
||||
waitForLoadAndFocusOnWindow(msg.objects.child);
|
||||
});
|
||||
|
@ -849,6 +849,7 @@ SimpleTest.waitForFocus = function (callback, targetWindow, expectBlankPage) {
|
|||
}
|
||||
else {
|
||||
browser.messageManager.removeMessageListener("WaitForFocus:ChildFocused", waitTest);
|
||||
SimpleTest._pendingWaitForFocusCount--;
|
||||
setTimeout(callback, 0, browser ? browser.contentWindowAsCPOW : targetWindow);
|
||||
}
|
||||
});
|
||||
|
|
Загрузка…
Ссылка в новой задаче