dom/plugins/test/mochitest/file_bug863792.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 <html>
     3 <head>
     4   <title>File for Bug 863792</title>
     6   <meta http-equiv="content-type" content="text/html; charset=utf-8">
     7   <base href="chrome://browser/content/">
     8 </head>
     9 <body>
    10 <script type="application/javascript">
    12 // A plugin that removes itself from the document and inactivates said document
    13 // inside NPP_New. We should not leak the instance. See also test_bug854082
    15 var outerwindow = window;
    16 var i = document.createElement("iframe");
    17 i.width = 500;
    18 i.height = 500;
    19 var ob = document.body;
    20 document.body.appendChild(i);
    21 i.addEventListener("load", function loaded() {
    22   var id = i.contentDocument;
    23   var e = id.createElement("embed");
    24   var callbackrun = false;
    25   e.width = 200;
    26   e.height = 200;
    27   e.type = "application/x-test";
    28   e.__defineSetter__("pluginFoundElement", function() {
    29     window.console.log("pluginFoundElement");
    30     e.style.display = "none";
    31     e.clientTop;
    32     i.removeEventListener("load", loaded);
    33     ob.removeChild(i);
    34     id.body.clientTop;
    35     id.body.removeChild(e);
    36     callbackrun = true;
    37   });
    38   id.body.appendChild(e);
    39   e.clientTop;
    40   e = id = i = ob = null;
    41   SpecialPowers.forceCC(); SpecialPowers.forceGC();
    42 }, false);
    43 </script>
    44 </body>
    45 </html>

mercurial