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=944847
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 944847</title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 <script type="application/javascript">
13 /** Test for Bug 944847 **/
15 var e1 = document.createElement("div");
16 is(e1.onclick, null);
17 e1.setAttribute("onclick", "");
18 isnot(e1.onclick, null);
20 var e2 = document.implementation.createHTMLDocument(null, null).createElement("div");
21 is(e2.onclick, null);
22 e2.setAttribute("onclick", "");
23 is(e2.onclick, null);
25 var e3 = document.createElement("div");
26 is(e3.onclick, null);
27 e3.setAttribute("onclick", "");
28 e2.ownerDocument.adoptNode(e3);
29 is(e3.onclick, null);
31 </script>
32 </head>
33 <body>
34 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=944847">Mozilla Bug 944847</a>
35 <p id="display"></p>
36 <div id="content" style="display: none">
38 </div>
39 <pre id="test">
40 </pre>
41 </body>
42 </html>