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=481558
5 -->
6 <head>
7 <title>Test for Bug 481558</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 <link rel="stylesheet" type="text/css"
11 href="file_bug481558css.sjs?id=id1">
12 <link rel="stylesheet" type="text/css"
13 href="file_bug481558css.sjs?id=id2&server=example.com">
14 <link rel="stylesheet" type="text/css" href="http://example.com/tests/dom/xbl/test/file_bug481558css.sjs?id=id3">
15 <link rel="stylesheet" type="text/css" href="http://example.com/tests/dom/xbl/test/file_bug481558css.sjs?id=id4&server=localhost:8888">
16 </head>
17 <body onload="runTest();">
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=481558">Mozilla Bug 481558</a>
19 <p id="id1"></p>
20 <p id="id2"></p>
21 <p id="id3"></p>
22 <p id="id4"></p>
23 <pre id="test">
24 <script class="testbody" type="text/javascript">
26 SimpleTest.waitForExplicitFinish();
27 function runTest() {
28 is ($('id1').xblBoundProperty, 1, "XBL should be attached");
29 is ($('id2').xblBoundProperty, undefined, "XBL shouldn't be attached");
30 is ($('id3').xblBoundProperty, undefined, "XBL shouldn't be attached");
31 is ($('id4').xblBoundProperty, undefined, "XBL shouldn't be attached");
32 SimpleTest.finish();
33 }
35 </script>
36 </pre>
37 </body>
38 </html>