diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /dom/plugins/test/mochitest/test_bug854082.html | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'dom/plugins/test/mochitest/test_bug854082.html')
-rw-r--r-- | dom/plugins/test/mochitest/test_bug854082.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/dom/plugins/test/mochitest/test_bug854082.html b/dom/plugins/test/mochitest/test_bug854082.html new file mode 100644 index 000000000..ff3d1e1e8 --- /dev/null +++ b/dom/plugins/test/mochitest/test_bug854082.html @@ -0,0 +1,38 @@ +<!doctype html> +<html> +<head> + <title>Test for Bug 854082</title> + <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> + <script type="text/javascript" src="plugin-utils.js"></script> + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> + + <meta http-equiv="content-type" content="text/html; charset=utf-8"> + <base href="chrome://browser/content/"> +</head> +<body> +<script type="application/javascript"> + // Tests that destroying the plugin's frame inside NPP_New does not cause a + // crash + + SimpleTest.waitForExplicitFinish(); + setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); + + // Create an object that will spawn asynchronously + var o = document.createElement("object"); + o.type = "application/x-test"; + + // The test plugin sets pluginFoundElement on its element inside NPP_New, + // abuse this to run arbitrary script. + var setterCalled; + o.__defineSetter__("pluginFoundElement", function() { + o.style.display = "none"; + // Access clientTop to force layout flush + o.clientTop; + ok(true, "Setter called and did not crash"); + SimpleTest.finish(); + setterCalled = true; + }); + document.body.appendChild(o); +</script> +</body> +</html> |