mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 893349 - Dispatch event when find bar is initialized. r=dao
This commit is contained in:
parent
36e9b8f564
commit
db2c2f6823
@ -174,6 +174,10 @@
|
||||
|
||||
aTab._findBar = findBar;
|
||||
|
||||
let event = document.createEvent("Events");
|
||||
event.initEvent("TabFindInitialized", true, false);
|
||||
aTab.dispatchEvent(event);
|
||||
|
||||
return findBar;
|
||||
]]></body>
|
||||
</method>
|
||||
|
@ -44,6 +44,14 @@ function test() {
|
||||
|
||||
// Make sure the second tab is correct, then set it up
|
||||
gBrowser.selectedTab = tabs[1];
|
||||
gBrowser.selectedTab.addEventListener("TabFindInitialized", continueTests1);
|
||||
// Initialize the findbar
|
||||
gFindBar;
|
||||
}
|
||||
function continueTests1() {
|
||||
gBrowser.selectedTab.removeEventListener("TabFindInitialized",
|
||||
continueTests1);
|
||||
ok(true, "'TabFindInitialized' event properly dispatched!");
|
||||
ok(gFindBar.hidden, "Second tab doesn't show find bar!");
|
||||
gFindBar.open();
|
||||
is(gFindBar._findField.value, texts[0],
|
||||
@ -59,11 +67,11 @@ function test() {
|
||||
|
||||
// While we're here, let's test bug 253793
|
||||
gBrowser.reload();
|
||||
gBrowser.addEventListener("DOMContentLoaded", continueTests, true);
|
||||
gBrowser.addEventListener("DOMContentLoaded", continueTests2, true);
|
||||
}
|
||||
|
||||
function continueTests() {
|
||||
gBrowser.removeEventListener("DOMContentLoaded", continueTests, true);
|
||||
function continueTests2() {
|
||||
gBrowser.removeEventListener("DOMContentLoaded", continueTests2, true);
|
||||
ok(!gFindBar.getElement("highlight").checked, "Highlight button reset!");
|
||||
gFindBar.close();
|
||||
ok(gFindBar.hidden, "First tab doesn't show find bar!");
|
||||
|
Loading…
Reference in New Issue
Block a user