Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
3 <?xml-stylesheet href="chrome://mochikit/content/tests/SimpleTest/test.css" type="text/css"?>
5 <window title="Tooltip Noautohide Tests"
6 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
8 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"></script>
11 <tooltip id="thetooltip" noautohide="true"
12 onpopupshown="setTimeout(tooltipStillShown, 6000)"
13 onpopuphidden="ok(gChecked, 'tooltip did not hide'); SimpleTest.finish()">
14 <label id="label" value="This is a tooltip"/>
15 </tooltip>
17 <button id="button" label="Tooltip Text" tooltip="thetooltip"/>
19 <script class="testbody" type="application/javascript">
20 <![CDATA[
22 var gChecked = false;
24 function runTests()
25 {
26 var button = document.getElementById("button");
27 var windowUtils = window.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
28 .getInterface(Components.interfaces.nsIDOMWindowUtils);
29 windowUtils.disableNonTestMouseEvents(true);
30 synthesizeMouse(button, 2, 2, { type: "mouseover" });
31 synthesizeMouse(button, 4, 4, { type: "mousemove" });
32 synthesizeMouse(button, 6, 6, { type: "mousemove" });
33 windowUtils.disableNonTestMouseEvents(false);
34 }
36 function tooltipStillShown()
37 {
38 gChecked = true;
39 document.getElementById("thetooltip").hidePopup();
40 }
42 SimpleTest.waitForExplicitFinish();
43 SimpleTest.waitForFocus(runTests);
45 ]]>
46 </script>
48 <body xmlns="http://www.w3.org/1999/xhtml">
49 <p id="display">
50 </p>
51 <div id="content" style="display: none">
52 </div>
53 <pre id="test">
54 </pre>
55 </body>
57 </window>