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_bug703210.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_bug703210.js')
-rw-r--r-- | layout/xul/test/browser_bug703210.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/layout/xul/test/browser_bug703210.js b/layout/xul/test/browser_bug703210.js new file mode 100644 index 000000000..cfd626b1c --- /dev/null +++ b/layout/xul/test/browser_bug703210.js @@ -0,0 +1,33 @@ +add_task(function* () { + const url = "data:text/html," + + "<html onmousemove='event.stopPropagation()'" + + " onmouseenter='event.stopPropagation()' onmouseleave='event.stopPropagation()'" + + " onmouseover='event.stopPropagation()' onmouseout='event.stopPropagation()'>" + + "<p id=\"p1\" title=\"tooltip is here\">This paragraph has a tooltip.</p>" + + "<p id=\"p2\">This paragraph doesn't have tooltip.</p></html>"; + + let tab = yield BrowserTestUtils.openNewForegroundTab(gBrowser, url); + let browser = gBrowser.selectedBrowser; + + yield new Promise(resolve => { + SpecialPowers.pushPrefEnv({"set": [["ui.tooltipDelay", 0]]}, resolve); + }); + + // Send a mousemove at a known position to start the test. + yield BrowserTestUtils.synthesizeMouseAtCenter("#p2", { type: "mousemove" }, browser); + let popupShownPromise = BrowserTestUtils.waitForEvent(document, "popupshown", false, event => { + is(event.originalTarget.localName, "tooltip", "tooltip is showing"); + return true; + }); + yield BrowserTestUtils.synthesizeMouseAtCenter("#p1", { type: "mousemove" }, browser); + yield popupShownPromise; + + let popupHiddenPromise = BrowserTestUtils.waitForEvent(document, "popuphidden", false, event => { + is(event.originalTarget.localName, "tooltip", "tooltip is hidden"); + return true; + }); + yield BrowserTestUtils.synthesizeMouseAtCenter("#p2", { type: "mousemove" }, browser); + yield popupHiddenPromise; + + gBrowser.removeCurrentTab(); +}); |