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"?>
4 <!--
5 https://bugzilla.mozilla.org/show_bug.cgi?id=586961
6 -->
7 <window title="Mozilla Bug 586961"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
10 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
11 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/EventUtils.js"/>
12 <body xmlns="http://www.w3.org/1999/xhtml">
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=586961">Mozilla Bug 586961</a>
15 <p id="display"></p>
16 <div id="content" style="display: none">
17 </div>
18 </body>
20 <box onclick="clicked(event)">
21 <label id="controllabel" control="controlbutton" accesskey="k" value="Click here" />
22 <button id="controlbutton" label="Button" />
23 </box>
25 <script class="testbody" type="application/javascript;version=1.7"><![CDATA[
27 /** Test for Bug 586961 **/
29 function clicked(event) {
30 is(event.target.id, "controlbutton", "Accesskey was directed to controlled element.");
31 SimpleTest.finish();
32 }
34 function test() {
35 var accessKeyDetails = (navigator.platform.indexOf("Mac") >= 0) ?
36 { altKey : true, ctrlKey : true } :
37 { altKey : true, shiftKey: true };
38 synthesizeKey("k", accessKeyDetails);
39 }
41 SimpleTest.waitForExplicitFinish();
42 SimpleTest.waitForFocus(test, window);
44 ]]></script>
46 </window>