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=391002
6 -->
7 <window title="Mozilla Bug 391002"
8 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"/>
11 <!-- test results are displayed in the html:body -->
12 <body xmlns="http://www.w3.org/1999/xhtml">
13 <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=391002"
14 target="_blank">Mozilla Bug 391002</a>
15 </body>
17 <button id="btn1" command="cmd1"/>
19 <button id="btn2">
20 <observes id="observes" element="cmd1" attribute="label"/>
21 </button>
23 <commandset>
24 <command id="cmd1" label="cmd1"/>
25 <command id="cmd2" label="cmd2"/>
26 </commandset>
28 <!-- test code goes here -->
29 <script type="application/javascript"><![CDATA[
31 /** Test for Bug 391002 **/
33 $("btn1").setAttribute("command", "cmd2");
34 is($("btn1").getAttribute("label"), $("cmd2").getAttribute("label"))
36 $("observes").setAttribute("element", "cmd2");
37 is($("btn2").getAttribute("label"), $("cmd2").getAttribute("label"))
39 ]]></script>
40 </window>