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 <!-- This Source Code Form is subject to the terms of the Mozilla Public
3 - License, v. 2.0. If a copy of the MPL was not distributed with this file,
4 - You can obtain one at http://mozilla.org/MPL/2.0/. -->
5 <html>
6 <!--
7 https://bugzilla.mozilla.org/show_bug.cgi?id=686203
8 -->
10 <head>
11 <title>Test for Bug 686203</title>
12 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
13 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
14 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
15 </head>
17 <body>
18 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=686203">Mozilla Bug 686203</a>
19 <p id="display"></p>
20 <div id="content" style="display: none">
21 </div>
23 <pre id="test">
24 <script type="application/javascript">
26 /** Test for Bug 686203 **/
27 SimpleTest.waitForExplicitFinish();
28 SimpleTest.waitForFocus(function() {
29 var ce = document.getElementById("ce");
30 var input = document.getElementById("input");
31 ce.focus();
33 var eventDetails = { button : 2 };
34 synthesizeMouseAtCenter(input, eventDetails);
36 synthesizeKey("Z", {});
38 /* check values */
39 is(input.value, "Z", "input correctly focused after right-click");
40 is(ce.textContent, "abc", "contenteditable correctly blurred after right-click on input");
42 SimpleTest.finish();
43 });
44 </script>
45 </pre>
47 <input type="text" value="" id="input" />
48 <div id="ce" contenteditable="true">abc</div>
49 </body>
50 </html>