mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 14:52:16 +00:00
Bug 521233 - waitForFocus(callback) times out in browser chrome tests. use it in browser_bug304198.js, r=enn
This commit is contained in:
parent
5ea0a853b4
commit
cc70be0e78
@ -38,13 +38,10 @@
|
|||||||
function test() {
|
function test() {
|
||||||
waitForExplicitFinish();
|
waitForExplicitFinish();
|
||||||
|
|
||||||
if (Cc["@mozilla.org/focus-manager;1"].getService(Ci.nsIFocusManager).activeWindow !=
|
waitForFocus(continue_test);
|
||||||
window) {
|
}
|
||||||
setTimeout(test, 0);
|
|
||||||
window.focus();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
function continue_test() {
|
||||||
let charsToDelete, deletedURLTab, fullURLTab, partialURLTab, testPartialURL, testURL;
|
let charsToDelete, deletedURLTab, fullURLTab, partialURLTab, testPartialURL, testURL;
|
||||||
|
|
||||||
charsToDelete = 5;
|
charsToDelete = 5;
|
||||||
|
@ -238,6 +238,10 @@ SimpleTest.waitForFocus = function (callback, targetWindow) {
|
|||||||
var fm = Components.classes["@mozilla.org/focus-manager;1"].
|
var fm = Components.classes["@mozilla.org/focus-manager;1"].
|
||||||
getService(Components.interfaces.nsIFocusManager);
|
getService(Components.interfaces.nsIFocusManager);
|
||||||
|
|
||||||
|
var usedTargetWindow = {};
|
||||||
|
fm.getFocusedElementForWindow(targetWindow, true, usedTargetWindow);
|
||||||
|
targetWindow = usedTargetWindow.value;
|
||||||
|
|
||||||
function debugFocusLog(prefix) {
|
function debugFocusLog(prefix) {
|
||||||
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user