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/test_bug1197913.xul | |
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/test_bug1197913.xul')
-rw-r--r-- | layout/xul/test/test_bug1197913.xul | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/layout/xul/test/test_bug1197913.xul b/layout/xul/test/test_bug1197913.xul new file mode 100644 index 000000000..6f922402d --- /dev/null +++ b/layout/xul/test/test_bug1197913.xul @@ -0,0 +1,68 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/css" href="chrome://global/skin"?> +<?xml-stylesheet type="text/css" href="/tests/SimpleTest/test.css"?> +<!-- +https://bugzilla.mozilla.org/show_bug.cgi?id=1197913 +--> +<window title="Mozilla Bug 1197913" + xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" + onload="SimpleTest.waitForFocus(nextTest, window)"> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"/> + <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"/> + + + <!-- test results are displayed in the html:body --> + <body xmlns="http://www.w3.org/1999/xhtml"> + <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1197913" + target="_blank">Mozilla Bug 1197913</a> + </body> + + <hbox align="center" pack="center"> + <menulist> + <menupopup> + <menuitem label="Car" /> + <menuitem label="Taxi" id="target" /> + <menuitem label="Bus" /> + </menupopup> + </menulist> + </hbox> + <!-- test code goes here --> + <script type="application/javascript"> + <![CDATA[ + SimpleTest.waitForExplicitFinish(); + + let menulist = document.getElementsByTagName("menulist")[0]; + let menuitem = document.getElementById("target"); + + function onDOMMenuItemActive(e) { + menuitem.removeEventListener("DOMMenuItemActive", onDOMMenuItemActive); + + synthesizeMouse(menuitem, 0, 0, { type: "mousemove" }); + synthesizeMouse(menuitem, -1, 0, { type: "mousemove" }); + + setTimeout(() => { + if (navigator.platform.toLowerCase().startsWith("win")) { + ok(menuitem.getAttribute("_moz-menuactive")); + } else { + ok(!menuitem.getAttribute("_moz-menuactive")); + } + + SimpleTest.finish(); + }); + } + + function onPopupShown(e) { + menulist.removeEventListener("popupshown", onPopupShown); + menuitem.addEventListener("DOMMenuItemActive", onDOMMenuItemActive); + synthesizeMouse(menuitem, 0, 0, { type: "mousemove" }); + synthesizeMouse(menuitem, 1, 0, { type: "mousemove" }); + } + + function nextTest(e) { + menulist.addEventListener("popupshown", onPopupShown); + synthesizeMouseAtCenter(menulist, {}); + } + + ]]> + </script> +</window> |