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=707564
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 707564</title>
9 <script type="application/javascript" src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="chrome://mochikit/content/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=707564">Mozilla Bug 707564</a>
14 <p id="display"></p>
15 <div id="content" style="display: none">
16 <iframe id="t1" src="http://example.org/tests/dom/bindings/test/file_bug707564.html"></iframe>
17 <iframe id="t2" src="http://example.org/tests/dom/bindings/test/file_bug707564.html"></iframe>
18 </div>
19 <pre id="test">
20 <script type="application/javascript">
22 /** Test for Bug 775543 **/
23 function test()
24 {
25 var nav = document.getElementById("t1").contentWindow.navigator;
26 ise(nav.foopy, undefined, "We should have an Xray now");
27 is(nav.wrappedJSObject.foopy, 5, "We should have the right navigator object");
28 var props = Object.getOwnPropertyNames(nav);
29 isnot(props.indexOf("mozApps"), -1,
30 "Should enumerate a mozApps property on navigator xray");
32 var nav = document.getElementById("t2").contentWindow.navigator;
33 ise(nav.foopy, undefined, "We should have an Xray now again");
34 is(nav.wrappedJSObject.foopy, 5, "We should have the right navigator object again");
35 var found = false;
36 for (var name in nav) {
37 if (name == "mozApps") {
38 found = true;
39 }
40 }
41 ok(found, "Should enumerate a mozApps property on navigator xray via for...in");
43 SimpleTest.finish();
44 }
46 addLoadEvent(test);
48 SimpleTest.waitForExplicitFinish();
49 </script>
50 </pre>
51 </body>
52 </html>