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