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 | <title>Selection test iframe</title> |
michael@0 | 3 | <link rel=author title="Aryeh Gregor" href=ayg@aryeh.name> |
michael@0 | 4 | <body> |
michael@0 | 5 | <script src=common.js></script> |
michael@0 | 6 | <script> |
michael@0 | 7 | "use strict"; |
michael@0 | 8 | |
michael@0 | 9 | // This script only exists because we want to evaluate the range endpoints |
michael@0 | 10 | // in each iframe using that iframe's local variables set up by common.js. It |
michael@0 | 11 | // just creates a range with the endpoints given by |
michael@0 | 12 | // eval(window.testRangeInput), and assigns the result to window.testRange. If |
michael@0 | 13 | // there's an exception, it's assigned to window.unexpectedException. |
michael@0 | 14 | // Everything else is to be done by the script that created the iframe. |
michael@0 | 15 | window.unexpectedException = null; |
michael@0 | 16 | |
michael@0 | 17 | function run() { |
michael@0 | 18 | window.unexpectedException = null; |
michael@0 | 19 | try { |
michael@0 | 20 | window.testRange = rangeFromEndpoints(eval(window.testRangeInput)); |
michael@0 | 21 | } catch(e) { |
michael@0 | 22 | window.unexpectedException = e; |
michael@0 | 23 | } |
michael@0 | 24 | } |
michael@0 | 25 | |
michael@0 | 26 | // Remove the scripts so they don't run repeatedly when the iframe is |
michael@0 | 27 | // reinitialized |
michael@0 | 28 | [].forEach.call(document.querySelectorAll("script"), function(script) { |
michael@0 | 29 | script.parentNode.removeChild(script); |
michael@0 | 30 | }); |
michael@0 | 31 | |
michael@0 | 32 | testDiv.style.display = "none"; |
michael@0 | 33 | </script> |