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=692520
5 -->
6 <head>
7 <title>Test for Bug 692520</title>
8 <script type="application/javascript" src="/MochiKit/packed.js"></script>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=692520">Mozilla Bug 692520</a>
15 <p id="display"></p>
16 <div id="content">
17 <textarea></textarea>
18 </div>
19 <pre id="test">
20 <script type="application/javascript">
22 /** Test for Bug 692520 **/
23 function test(prop, value) {
24 var t = document.querySelector("textarea");
25 t.value = "testing";
26 t.selectionStart = 1;
27 t.selectionEnd = 3;
28 t.selectionDirection = "backward";
29 t.style.display = "";
30 document.body.clientWidth;
31 t.style.display = "none";
32 is(t[prop], value, "Correct value for the " + prop + " property");
33 }
35 test("selectionStart", 1);
36 test("selectionEnd", 3);
37 test("selectionDirection", "backward");
39 </script>
40 </pre>
41 </body>
42 </html>