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