dom/imptests/editing/selecttest/test-iframe.html

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

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

mercurial