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="Toolbar" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
6 onload="startTest();">
8 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <toolbox>
11 <toolbarpalette id="palette"/>
13 <toolbar id="tb1" currentset="p1"/>
14 </toolbox>
16 <!-- test resuls are displayed in the html:body -->
17 <body xmlns="http://www.w3.org/1999/xhtml"
18 style="height: 300px; overflow: auto;"/>
20 <!-- test code goes here -->
21 <script type="text/javascript"><![CDATA[
22 var toolbar = $("tb1");
24 ok(toolbar, "got the toolbar, triggering the xbl constructor");
26 var palette = $("palette");
27 ok(palette, "palette is still in the document");
29 var button = document.createElement("p1");
30 button.id = button.label = "p1";
31 palette.appendChild(button);
33 SimpleTest.waitForExplicitFinish();
34 function startTest() {
35 is(button.parentNode, toolbar, "button has been added to the toolbar");
36 SimpleTest.finish();
37 }
38 ]]></script>
39 </window>