accessible/tests/mochitest/elm/test_plugin.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 <!DOCTYPE html>
michael@0 2 <html>
michael@0 3 <head>
michael@0 4 <title>Plugin tests</title>
michael@0 5 <link rel="stylesheet" type="text/css"
michael@0 6 href="chrome://mochikit/content/tests/SimpleTest/test.css" />
michael@0 7
michael@0 8 <script type="application/javascript"
michael@0 9 src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
michael@0 10
michael@0 11 <script type="application/javascript"
michael@0 12 src="../common.js"></script>
michael@0 13 <script type="application/javascript"
michael@0 14 src="../role.js"></script>
michael@0 15 <script type="application/javascript"
michael@0 16 src="../states.js"></script>
michael@0 17
michael@0 18 <script type="application/javascript">
michael@0 19
michael@0 20 function doTest()
michael@0 21 {
michael@0 22 if (!WIN) {
michael@0 23 ok(true,
michael@0 24 "It's Windows specific test. Feel free to extend the test.");
michael@0 25
michael@0 26 SimpleTest.finish();
michael@0 27 return;
michael@0 28 }
michael@0 29
michael@0 30 testStates("plugin-windowless", STATE_UNAVAILABLE);
michael@0 31 testAccessibleTree("plugin-windowless", { EMBEDDED_OBJECT: [ ] });
michael@0 32
michael@0 33 testStates("plugin-windowless-fallback", STATE_UNAVAILABLE);
michael@0 34 testAccessibleTree("plugin-windowless-fallback", { EMBEDDED_OBJECT: [ ] });
michael@0 35
michael@0 36 testStates("plugin-windowed", 0, 0, STATE_UNAVAILABLE);
michael@0 37 testAccessibleTree("plugin-windowed", { EMBEDDED_OBJECT: [ { NOTHING: [] } ] });
michael@0 38
michael@0 39 testStates("plugin-windowed-fallback", 0, 0, STATE_UNAVAILABLE);
michael@0 40 testAccessibleTree("plugin-windowed-fallback",
michael@0 41 { EMBEDDED_OBJECT: [ { NOTHING: [] } ] });
michael@0 42
michael@0 43 // make sure we handle content changes under the plugin.
michael@0 44 getNode("fallback1").setAttribute("href", "5");
michael@0 45 getNode("fallback2").setAttribute("href", "5");
michael@0 46 SimpleTest.executeSoon(function () { SimpleTest.finish(); });
michael@0 47 }
michael@0 48
michael@0 49 SimpleTest.waitForExplicitFinish();
michael@0 50 addA11yLoadEvent(doTest);
michael@0 51 setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
michael@0 52 </script>
michael@0 53 </head>
michael@0 54 <body>
michael@0 55
michael@0 56 <a target="_blank"
michael@0 57 title="Embed and object HTML tags should be given an accessible role of embedded object"
michael@0 58 href="https://bugzilla.mozilla.org/show_bug.cgi?id=485270">Bug 485270</a>
michael@0 59 <a target="_blank"
michael@0 60 title="Embedded object accessibles for inaccessible/windowless plugins should not expose a NULL child"
michael@0 61 href="https://bugzilla.mozilla.org/show_bug.cgi?id=816856">Bug 816856</a>
michael@0 62 <a target="_blank"
michael@0 63 title="Updating accessible tree for plugin with fallback shouldn't crash"
michael@0 64 href="https://bugzilla.mozilla.org/show_bug.cgi?id=881636">Bug 881636</a>
michael@0 65 <p id="display"></p>
michael@0 66 <div id="content" style="display: none"></div>
michael@0 67 <pre id="test">
michael@0 68 </pre>
michael@0 69
michael@0 70 <embed id="plugin-windowless" type="application/x-test"
michael@0 71 width="300" height="300"></embed>
michael@0 72 <embed id="plugin-windowed" type="application/x-test" wmode="window"
michael@0 73 width="300" height="300"></embed>
michael@0 74 <embed id="plugin-windowless-fallback" type="application/x-test"
michael@0 75 width="300" height="300"><a id="fallback1">foo</a></embed>
michael@0 76 <embed id="plugin-windowed-fallback" type="application/x-test" wmode="window"
michael@0 77 width="300" height="300"><a id="fallback2">foo</a></embed>
michael@0 78 </body>
michael@0 79 </html>

mercurial