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
4 href="chrome://mochikit/content/tests/SimpleTest/test.css"
5 type="text/css"?>
6 <!--
7 https://bugzilla.mozilla.org/show_bug.cgi?id=451286
8 -->
9 <window title="Mozilla Bug 451286"
10 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
12 <script type="application/javascript"
13 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
14 <script type="application/javascript"
15 src="chrome://mochikit/content/tests/SimpleTest/WindowSnapshot.js"></script>
17 <body xmlns="http://www.w3.org/1999/xhtml">
18 <a target="_blank"
19 href="https://bugzilla.mozilla.org/show_bug.cgi?id=451286">
20 Mozilla Bug 451286
21 </a>
23 <p id="display"></p>
24 <div id="content" style="display: none">
25 </div>
26 <pre id="test">
27 </pre>
28 </body>
30 <script class="testbody" type="application/javascript">
31 <![CDATA[
33 // To be called by the window we open.
34 function parentFinish() {
35 // This is called with JS code from the window we open on the
36 // stack. We need to GC everything in that window, so do that
37 // from a timeout and then call SimpleTest.finish().
38 setTimeout(doFinish, 0);
39 }
41 function doFinish() {
42 // Garbage collect objects created in this test can cause
43 // assertions, so GC now to blame those assertions to this test.
44 SpecialPowers.gc();
45 SimpleTest.finish();
46 }
48 /** Test for Bug 451286 **/
49 SimpleTest.waitForExplicitFinish();
50 window.open("bug451286_window.xul", "451286test",
51 "chrome,width=600,height=600");
53 ]]>
54 </script>
56 </window>