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 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=196523
5 -->
6 <head>
7 <title>Test for Bug 196523</title>
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
10 </head>
11 <body>
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=196523">Mozilla Bug 196523</a>
13 <script>
14 var expectedMessages = 2;
15 SimpleTest.waitForExplicitFinish();
16 window.addEventListener("message", function(e) {
17 --expectedMessages;
18 var str = e.data;
19 var idx = str.indexOf(';');
20 var val = str.substring(0, idx);
21 var msg = str.substring(idx+1);
22 ok(val == "true", msg);
23 if (!expectedMessages) { SimpleTest.finish(); }
24 }, false);
25 </script>
26 <p id="display">
27 <iframe src="http://test1.example.org/tests/content/html/document/test/bug196523-subframe.html"></iframe>
28 </p>
29 <div id="content" style="display: none">
31 </div>
32 <pre id="test">
33 <script class="testbody" type="text/javascript">
35 /** Test for Bug 196523 **/
37 </script>
38 </pre>
39 </body>
40 </html>