diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /layout/xul/test/browser_bug1163304.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/xul/test/browser_bug1163304.js')
-rw-r--r-- | layout/xul/test/browser_bug1163304.js | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/layout/xul/test/browser_bug1163304.js b/layout/xul/test/browser_bug1163304.js new file mode 100644 index 000000000..b8e9409dd --- /dev/null +++ b/layout/xul/test/browser_bug1163304.js @@ -0,0 +1,35 @@ +function test() { + waitForExplicitFinish(); + + let searchBar = BrowserSearch.searchBar; + searchBar.focus(); + + let DOMWindowUtils = EventUtils._getDOMWindowUtils(); + is(DOMWindowUtils.IMEStatus, DOMWindowUtils.IME_STATUS_ENABLED, + "IME should be available when searchbar has focus"); + + let searchPopup = document.getElementById("PopupSearchAutoComplete"); + searchPopup.addEventListener("popupshown", function (aEvent) { + searchPopup.removeEventListener("popupshown", arguments.callee); + setTimeout(function () { + is(DOMWindowUtils.IMEStatus, DOMWindowUtils.IME_STATUS_ENABLED, + "IME should be available even when the popup of searchbar is open"); + searchPopup.addEventListener("popuphidden", function (aEvent) { + searchPopup.removeEventListener("popuphidden", arguments.callee); + setTimeout(function () { + is(DOMWindowUtils.IMEStatus, DOMWindowUtils.IME_STATUS_DISABLED, + "IME should not be available when menubar is active"); + // Inactivate the menubar (and restore the focus to the searchbar + EventUtils.synthesizeKey("VK_ESCAPE", {}); + is(DOMWindowUtils.IMEStatus, DOMWindowUtils.IME_STATUS_ENABLED, + "IME should be available after focus is back to the searchbar"); + finish(); + }, 0); + }); + // Activate the menubar, then, the popup should be closed + EventUtils.synthesizeKey("VK_ALT", {}); + }, 0); + }); + // Open popup of the searchbar + EventUtils.synthesizeKey("VK_F4", {}); +} |