4 https://bugzilla.mozilla.org/show_bug.cgi?id=810494
8 <title>Test for Bug
810494</title>
9 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
10 <script src=
"/tests/SimpleTest/SpecialPowers.js"></script>
11 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css"/>
14 <a target=
"_blank" href=
"https://bugzilla.mozilla.org/show_bug.cgi?id=810494">Mozilla Bug
810494</a>
16 <script type=
"application/javascript">
18 function test(tag, type) {
20 info(
"testing " + tag +
" tag with type " + type);
22 const OBJLC = SpecialPowers.Ci.nsIObjectLoadingContent;
23 let obj = document.createElement(tag);
25 document.body.appendChild(obj);
28 obj = SpecialPowers.wrap(obj);
30 // We expect this tag to simply go to alternate content, not get a
31 // pluginProblem binding or fire any events.
32 ok(obj.displayedType == OBJLC.TYPE_NULL,
"expected null type");
33 ok(obj.pluginFallbackType == OBJLC.PLUGIN_ALTERNATE,
34 "expected alternate fallback mode");
37 // Test all non-plugin types these tags can load to make sure none of them
38 // trigger plugin-specific fallbacks when loaded with no URI
39 test(
"object",
"text/html"); // Document
40 test(
"object",
"image/png"); // Image
41 test(
"object",
"image/svg+xml"); // SVG Document
43 test(
"embed",
"image/png"); // Image
44 test(
"embed",
"image/svg+xml"); // SVG Document