dom/plugins/test/mochitest/file_bug863792.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/file_bug863792.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,45 @@
     1.4 +<!doctype html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>File for Bug 863792</title>
     1.8 +
     1.9 +  <meta http-equiv="content-type" content="text/html; charset=utf-8">
    1.10 +  <base href="chrome://browser/content/">
    1.11 +</head>
    1.12 +<body>
    1.13 +<script type="application/javascript">
    1.14 +
    1.15 +// A plugin that removes itself from the document and inactivates said document
    1.16 +// inside NPP_New. We should not leak the instance. See also test_bug854082
    1.17 +
    1.18 +var outerwindow = window;
    1.19 +var i = document.createElement("iframe");
    1.20 +i.width = 500;
    1.21 +i.height = 500;
    1.22 +var ob = document.body;
    1.23 +document.body.appendChild(i);
    1.24 +i.addEventListener("load", function loaded() {
    1.25 +  var id = i.contentDocument;
    1.26 +  var e = id.createElement("embed");
    1.27 +  var callbackrun = false;
    1.28 +  e.width = 200;
    1.29 +  e.height = 200;
    1.30 +  e.type = "application/x-test";
    1.31 +  e.__defineSetter__("pluginFoundElement", function() {
    1.32 +    window.console.log("pluginFoundElement");
    1.33 +    e.style.display = "none";
    1.34 +    e.clientTop;
    1.35 +    i.removeEventListener("load", loaded);
    1.36 +    ob.removeChild(i);
    1.37 +    id.body.clientTop;
    1.38 +    id.body.removeChild(e);
    1.39 +    callbackrun = true;
    1.40 +  });
    1.41 +  id.body.appendChild(e);
    1.42 +  e.clientTop;
    1.43 +  e = id = i = ob = null;
    1.44 +  SpecialPowers.forceCC(); SpecialPowers.forceGC();
    1.45 +}, false);
    1.46 +</script>
    1.47 +</body>
    1.48 +</html>

mercurial