1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/content/base/test/test_bug429157.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,54 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<!-- 1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=429157 1.8 +--> 1.9 +<head> 1.10 + <title>Test for Bug 429157</title> 1.11 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.12 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.13 +</head> 1.14 +<body onload="runtests();"> 1.15 + 1.16 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=429157">Mozilla Bug 429157</a> 1.17 +<br> 1.18 + 1.19 +<script> 1.20 +var missingPlugins = new Array(); 1.21 +const OBJLC = SpecialPowers.Ci.nsIObjectLoadingContent; 1.22 + 1.23 +function pluginBindingAttached(event) 1.24 +{ 1.25 + var plugin = event.target; 1.26 + plugin instanceof OBJLC; 1.27 + if (SpecialPowers.wrap(plugin).pluginFallbackType == OBJLC.PLUGIN_UNSUPPORTED) 1.28 + missingPlugins.push(plugin); 1.29 +} 1.30 + 1.31 +document.addEventListener("PluginBindingAttached", pluginBindingAttached, true); 1.32 +</script> 1.33 + 1.34 +<object id="obj1" type="image/png" >ALT image/png</object><br> 1.35 +<object id="obj2" type="image/svg+xml">ALT image/svg+xml</object><br> 1.36 +<object id="obj3" type="text/html" >ALT text/html</object><br> 1.37 +<object id="obj4" type="text/plain" >ALT text/plain</object><br> 1.38 + 1.39 +<script class="testbody" type="text/javascript"> 1.40 +function runtests() 1.41 +{ 1.42 + for (var obj of document.querySelectorAll("object")) { 1.43 + obj.clientTop; 1.44 + } 1.45 + 1.46 + SimpleTest.executeSoon(function () { 1.47 + is(missingPlugins.length, 0, "There should be no missing plugins for this page"); 1.48 + 1.49 + SimpleTest.finish(); 1.50 + }); 1.51 +} 1.52 + 1.53 +SimpleTest.waitForExplicitFinish(); 1.54 +</script> 1.55 +</pre> 1.56 +</body> 1.57 +</html>