mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 869832 - browser_typeAheadFind.js should use whenDelayedStartupFinished and initialize the find bar in the original browser window rather than in the purposefully opened one. r=gavin
--HG-- extra : rebase_source : 997c8ec8bf83f01bf4d7e67f4c2be208186967db
This commit is contained in:
parent
eb21097a79
commit
979e329837
@ -8,27 +8,21 @@ function test() {
|
||||
waitForExplicitFinish();
|
||||
|
||||
testWindow = OpenBrowserWindow();
|
||||
testWindow.addEventListener("load", function() {
|
||||
testWindow.removeEventListener("load", arguments.callee, false);
|
||||
ok(true, "Load listener called");
|
||||
|
||||
executeSoon(function() {
|
||||
let selectedBrowser = testWindow.gBrowser.selectedBrowser;
|
||||
selectedBrowser.addEventListener("pageshow", function() {
|
||||
selectedBrowser.removeEventListener("pageshow", arguments.callee,
|
||||
false);
|
||||
ok(true, "pageshow listener called");
|
||||
waitForFocus(onFocus, testWindow.content);
|
||||
}, true);
|
||||
testWindow.content.location = "data:text/html,<h1>A Page</h1>";
|
||||
});
|
||||
}, false);
|
||||
whenDelayedStartupFinished(testWindow, function () {
|
||||
let selectedBrowser = testWindow.gBrowser.selectedBrowser;
|
||||
selectedBrowser.addEventListener("pageshow", function() {
|
||||
selectedBrowser.removeEventListener("pageshow", arguments.callee, true);
|
||||
ok(true, "pageshow listener called");
|
||||
waitForFocus(onFocus, testWindow.content);
|
||||
}, true);
|
||||
gBrowser.loadURI("data:text/html,<h1>A Page</h1>");
|
||||
});
|
||||
}
|
||||
|
||||
function onFocus() {
|
||||
EventUtils.synthesizeKey("/", {});
|
||||
ok(gFindBarInitialized, "find bar is now initialized");
|
||||
testWindow.gFindBar.close();
|
||||
ok(!testWindow.gFindBarInitialized, "find bar is not initialized");
|
||||
EventUtils.synthesizeKey("/", {}, testWindow);
|
||||
ok(testWindow.gFindBarInitialized, "find bar is now initialized");
|
||||
testWindow.close();
|
||||
finish();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user