docshell/test/navigation/file_bug508537_1.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 <html>
     2   <head>
     3     <script>
     4       function dynFrameLoad() {
     5         var ifrs = document.getElementsByTagName("iframe");
     6         opener.ok(new String(ifrs[0].contentWindow.location).indexOf(ifrs[0].src) >= 0,
     7                   "Wrong document loaded (1)\n");
     8         opener.ok(new String(ifrs[1].contentWindow.location).indexOf(ifrs[1].src) >= 0,
     9                   "Wrong document loaded (2)\n");
    10         if (opener && ++opener.testCount == 1) {
    11           window.location = "goback.html";
    12         } else {
    13           opener.nextTest();
    14           window.close();
    15         }
    16       }
    18       window.addEventListener("load",
    19         function () {
    20           var container = document.getElementById("t1");
    21           container.addEventListener("load", dynFrameLoad, true);
    22           container.appendChild(container.appendChild(document.getElementById("i1")));
    23         }, false);
    24     </script>
    25   </head>
    26   <body>
    27     <h5>Container:</h5>
    28     <div id="t1"></div>
    29     <h5>Original frames:</h5>
    30     <iframe id="i1" src="frame0.html"></iframe>
    31     <iframe src="frame1.html"></iframe>
    32   </body>
    33 </html>

mercurial