Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <?xml version="1.0"?> |
michael@0 | 2 | <?xml-stylesheet href="chrome://global/skin" type="text/css"?> |
michael@0 | 3 | <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?> |
michael@0 | 4 | |
michael@0 | 5 | <window title="Tooltip Noautohide Tests" |
michael@0 | 6 | xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> |
michael@0 | 7 | |
michael@0 | 8 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 10 | |
michael@0 | 11 | <tooltip id="thetooltip" noautohide="true" |
michael@0 | 12 | onpopupshown="setTimeout(tooltipStillShown, 6000)" |
michael@0 | 13 | onpopuphidden="ok(gChecked, 'tooltip did not hide'); SimpleTest.finish()"> |
michael@0 | 14 | <label id="label" value="This is a tooltip"/> |
michael@0 | 15 | </tooltip> |
michael@0 | 16 | |
michael@0 | 17 | <button id="button" label="Tooltip Text" tooltip="thetooltip"/> |
michael@0 | 18 | |
michael@0 | 19 | <script class="testbody" type="application/javascript"> |
michael@0 | 20 | <![CDATA[ |
michael@0 | 21 | |
michael@0 | 22 | var gChecked = false; |
michael@0 | 23 | |
michael@0 | 24 | function runTests() |
michael@0 | 25 | { |
michael@0 | 26 | var button = document.getElementById("button"); |
michael@0 | 27 | var windowUtils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor) |
michael@0 | 28 | .getInterface(Components.interfaces.nsIDOMWindowUtils); |
michael@0 | 29 | windowUtils.disableNonTestMouseEvents(true); |
michael@0 | 30 | synthesizeMouse(button, 2, 2, { type: "mouseover" }); |
michael@0 | 31 | synthesizeMouse(button, 4, 4, { type: "mousemove" }); |
michael@0 | 32 | synthesizeMouse(button, 6, 6, { type: "mousemove" }); |
michael@0 | 33 | windowUtils.disableNonTestMouseEvents(false); |
michael@0 | 34 | } |
michael@0 | 35 | |
michael@0 | 36 | function tooltipStillShown() |
michael@0 | 37 | { |
michael@0 | 38 | gChecked = true; |
michael@0 | 39 | document.getElementById("thetooltip").hidePopup(); |
michael@0 | 40 | } |
michael@0 | 41 | |
michael@0 | 42 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 43 | SimpleTest.waitForFocus(runTests); |
michael@0 | 44 | |
michael@0 | 45 | ]]> |
michael@0 | 46 | </script> |
michael@0 | 47 | |
michael@0 | 48 | <body xmlns="http://www.w3.org/1999/xhtml"> |
michael@0 | 49 | <p id="display"> |
michael@0 | 50 | </p> |
michael@0 | 51 | <div id="content" style="display: none"> |
michael@0 | 52 | </div> |
michael@0 | 53 | <pre id="test"> |
michael@0 | 54 | </pre> |
michael@0 | 55 | </body> |
michael@0 | 56 | |
michael@0 | 57 | </window> |