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=360220
6 -->
7 <window title="Mozilla Bug 360220"
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"></script>
12 <body xmlns="http://www.w3.org/1999/xhtml">
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=360220">Mozilla Bug 360220</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
17 </div>
18 <pre id="test">
19 </pre>
20 </body>
22 <menulist id="menulist">
23 <menupopup>
24 <menuitem id="firstItem" label="foo" selected="true"/>
25 <menuitem id="secondItem" label="bar"/>
26 </menupopup>
27 </menulist>
28 <script class="testbody" type="application/javascript">
29 <![CDATA[
31 /** Test for Bug 360220 **/
33 var menulist = document.getElementById("menulist");
34 var secondItem = document.getElementById("secondItem");
35 menulist.selectedItem = secondItem;
37 ok(menulist.label == "bar", "second item was not selected");
38 secondItem.label = "new label";
39 ok(menulist.label == "new label", "menulist label was not updated to the label of its selected item");
40 ]]>
41 </script>
43 </window>