content/base/test/test_bug429157.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html>
     3 <!--
     4 https://bugzilla.mozilla.org/show_bug.cgi?id=429157
     5 -->
     6 <head>
     7   <title>Test for Bug 429157</title>
     8   <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
    10 </head>
    11 <body onload="runtests();">
    13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=429157">Mozilla Bug 429157</a>
    14 <br>
    16 <script>
    17 var missingPlugins = new Array();
    18 const OBJLC = SpecialPowers.Ci.nsIObjectLoadingContent;
    20 function pluginBindingAttached(event)
    21 {
    22   var plugin = event.target;
    23   plugin instanceof OBJLC;
    24   if (SpecialPowers.wrap(plugin).pluginFallbackType == OBJLC.PLUGIN_UNSUPPORTED)
    25     missingPlugins.push(plugin);
    26 }
    28 document.addEventListener("PluginBindingAttached", pluginBindingAttached, true);
    29 </script>
    31 <object id="obj1" type="image/png"    >ALT image/png</object><br>
    32 <object id="obj2" type="image/svg+xml">ALT image/svg+xml</object><br>
    33 <object id="obj3" type="text/html"    >ALT text/html</object><br>
    34 <object id="obj4" type="text/plain"   >ALT text/plain</object><br>
    36 <script class="testbody" type="text/javascript">
    37 function runtests()
    38 {
    39   for (var obj of document.querySelectorAll("object")) {
    40     obj.clientTop;
    41   }
    43   SimpleTest.executeSoon(function () {
    44     is(missingPlugins.length, 0, "There should be no missing plugins for this page");
    46     SimpleTest.finish();
    47   });
    48 }
    50 SimpleTest.waitForExplicitFinish();
    51 </script>
    52 </pre>
    53 </body>
    54 </html>

mercurial