dom/plugins/test/mochitest/test_bug863792.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/plugins/test/mochitest/test_bug863792.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +<!doctype html>
     1.5 +<html>
     1.6 +<head>
     1.7 +  <title>Test for Bug 863792</title>
     1.8 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     1.9 +  <script type="application/javascript" src="utils.js"></script>
    1.10 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.11 +
    1.12 +  <meta http-equiv="content-type" content="text/html; charset=utf-8">
    1.13 +</head>
    1.14 +<body>
    1.15 +<script type="application/javascript">
    1.16 +
    1.17 +// A plugin that removes itself from the document and inactivates said document
    1.18 +// inside NPP_New. We should not leak the instance. See also test_bug854082
    1.19 +
    1.20 +SimpleTest.waitForExplicitFinish();
    1.21 +setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
    1.22 +
    1.23 +var i = document.createElement("iframe");
    1.24 +i.src = "file_bug863792.html";
    1.25 +i.width = 500;
    1.26 +i.height = 500;
    1.27 +document.body.appendChild(i);
    1.28 +
    1.29 +i.addEventListener("load", function() {
    1.30 +  SpecialPowers.forceGC();
    1.31 +  SpecialPowers.forceCC();
    1.32 +  SimpleTest.executeSoon(function() {
    1.33 +    SpecialPowers.forceGC();
    1.34 +    SpecialPowers.forceCC();
    1.35 +    SimpleTest.executeSoon(function() {
    1.36 +      ok(true, "Didn't crash");
    1.37 +      SimpleTest.finish();
    1.38 +    });
    1.39 +  });
    1.40 +}, false);
    1.41 +</script>
    1.42 +</body>
    1.43 +</html>

mercurial