1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/accessible/tests/mochitest/elm/test_plugin.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,79 @@ 1.4 +<!DOCTYPE html> 1.5 +<html> 1.6 +<head> 1.7 + <title>Plugin tests</title> 1.8 + <link rel="stylesheet" type="text/css" 1.9 + href="chrome://mochikit/content/tests/SimpleTest/test.css" /> 1.10 + 1.11 + <script type="application/javascript" 1.12 + src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script> 1.13 + 1.14 + <script type="application/javascript" 1.15 + src="../common.js"></script> 1.16 + <script type="application/javascript" 1.17 + src="../role.js"></script> 1.18 + <script type="application/javascript" 1.19 + src="../states.js"></script> 1.20 + 1.21 + <script type="application/javascript"> 1.22 + 1.23 + function doTest() 1.24 + { 1.25 + if (!WIN) { 1.26 + ok(true, 1.27 + "It's Windows specific test. Feel free to extend the test."); 1.28 + 1.29 + SimpleTest.finish(); 1.30 + return; 1.31 + } 1.32 + 1.33 + testStates("plugin-windowless", STATE_UNAVAILABLE); 1.34 + testAccessibleTree("plugin-windowless", { EMBEDDED_OBJECT: [ ] }); 1.35 + 1.36 + testStates("plugin-windowless-fallback", STATE_UNAVAILABLE); 1.37 + testAccessibleTree("plugin-windowless-fallback", { EMBEDDED_OBJECT: [ ] }); 1.38 + 1.39 + testStates("plugin-windowed", 0, 0, STATE_UNAVAILABLE); 1.40 + testAccessibleTree("plugin-windowed", { EMBEDDED_OBJECT: [ { NOTHING: [] } ] }); 1.41 + 1.42 + testStates("plugin-windowed-fallback", 0, 0, STATE_UNAVAILABLE); 1.43 + testAccessibleTree("plugin-windowed-fallback", 1.44 + { EMBEDDED_OBJECT: [ { NOTHING: [] } ] }); 1.45 + 1.46 + // make sure we handle content changes under the plugin. 1.47 + getNode("fallback1").setAttribute("href", "5"); 1.48 + getNode("fallback2").setAttribute("href", "5"); 1.49 + SimpleTest.executeSoon(function () { SimpleTest.finish(); }); 1.50 + } 1.51 + 1.52 + SimpleTest.waitForExplicitFinish(); 1.53 + addA11yLoadEvent(doTest); 1.54 + setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED); 1.55 + </script> 1.56 +</head> 1.57 +<body> 1.58 + 1.59 + <a target="_blank" 1.60 + title="Embed and object HTML tags should be given an accessible role of embedded object" 1.61 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=485270">Bug 485270</a> 1.62 + <a target="_blank" 1.63 + title="Embedded object accessibles for inaccessible/windowless plugins should not expose a NULL child" 1.64 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=816856">Bug 816856</a> 1.65 + <a target="_blank" 1.66 + title="Updating accessible tree for plugin with fallback shouldn't crash" 1.67 + href="https://bugzilla.mozilla.org/show_bug.cgi?id=881636">Bug 881636</a> 1.68 + <p id="display"></p> 1.69 + <div id="content" style="display: none"></div> 1.70 + <pre id="test"> 1.71 + </pre> 1.72 + 1.73 + <embed id="plugin-windowless" type="application/x-test" 1.74 + width="300" height="300"></embed> 1.75 + <embed id="plugin-windowed" type="application/x-test" wmode="window" 1.76 + width="300" height="300"></embed> 1.77 + <embed id="plugin-windowless-fallback" type="application/x-test" 1.78 + width="300" height="300"><a id="fallback1">foo</a></embed> 1.79 + <embed id="plugin-windowed-fallback" type="application/x-test" wmode="window" 1.80 + width="300" height="300"><a id="fallback2">foo</a></embed> 1.81 +</body> 1.82 +</html>