Bug 1686668 [wpt PR 27185] - Update wpt metadata, a=testonly
[gecko.git] / dom / base / test / test_bug810494.html
blob1f3f07495561e687c89fcd72f7be3b5d4e41bfb4
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=810494
5 -->
6 <head>
7 <meta charset="utf-8">
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"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=810494">Mozilla Bug 810494</a>
15 <pre id="test">
16 <script type="application/javascript">
18 function test(tag, type) {
19 "use strict";
20 info("testing " + tag + " tag with type " + type);
22 const OBJLC = SpecialPowers.Ci.nsIObjectLoadingContent;
23 let obj = document.createElement(tag);
24 obj.type = type;
25 document.body.appendChild(obj);
27 obj instanceof OBJLC;
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
45 </script>
46 </pre>
47 </body>
48 </html>