зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1675349: Update tests under accessible/tests/mochitest to reflect the removal of plugins. r=jmathies
UPDATED ------- accessible/tests/mochitest/elm/test_HTMLSpec.html Bug 905215 Test that a11y shadow DOM gets objects of the right type and state from HTML dom. Changed <object> and <embed> plugin tests to find no accessible. accessible/tests/mochitest/elm/test_MathMLSpec.html Bug 1001634 Basic MathML a11y tests. Didn't use plugin, just initializes it. Remove plugin initialization. accessible/tests/mochitest/elm/test_plugin.html Test that a11y shadow tree gets proper type/state for plugin objects and their subtrees, even if there is an HTML fallback provided. Removed. accessible/tests/mochitest/focus/test_takeFocus.html Bug 677467 Test that a11y shadow tree focus follows DOM focus Remove plugin init but keep plugin test. Differential Revision: https://phabricator.services.mozilla.com/D95905
This commit is contained in:
Родитель
e5b505e41d
Коммит
49d0332fb2
|
@ -10,7 +10,6 @@ support-files =
|
|||
[test_listbox.xhtml]
|
||||
[test_MathMLSpec.html]
|
||||
[test_nsApplicationAcc.html]
|
||||
[test_plugin.html]
|
||||
[test_canvas.html]
|
||||
[test_shadowroot.html]
|
||||
support-files = test_shadowroot_subframe.html
|
||||
|
|
|
@ -461,20 +461,8 @@
|
|||
// ////////////////////////////////////////////////////////////////////////
|
||||
// HTML:embed (windowless/windowed plugins and media)
|
||||
|
||||
if (WIN) {
|
||||
obj = {
|
||||
role: ROLE_EMBEDDED_OBJECT,
|
||||
states: STATE_UNAVAILABLE,
|
||||
};
|
||||
|
||||
testElm("embed_plugin_windowless", obj);
|
||||
|
||||
obj = {
|
||||
role: ROLE_EMBEDDED_OBJECT,
|
||||
absentStates: STATE_UNAVAILABLE,
|
||||
};
|
||||
testElm("embed_plugin_windowed", obj);
|
||||
}
|
||||
ok(!isAccessible("embed_plugin_windowless"), "(blocked) windowless plugin embed element is not accessible");
|
||||
ok(!isAccessible("embed_plugin_windowed"), "(blocked) windowed plugin embed element is not accessible");
|
||||
|
||||
obj = {
|
||||
role: ROLE_GRAPHIC,
|
||||
|
@ -1133,20 +1121,8 @@
|
|||
// ////////////////////////////////////////////////////////////////////////
|
||||
// HTML:object (windowless/windowed plugins and media) and HTML:param
|
||||
|
||||
if (WIN) {
|
||||
obj = {
|
||||
role: ROLE_EMBEDDED_OBJECT,
|
||||
states: STATE_UNAVAILABLE,
|
||||
children: [ ], // no child for HTML:param
|
||||
};
|
||||
testElm("object_plugin_windowless", obj);
|
||||
|
||||
obj = {
|
||||
role: ROLE_EMBEDDED_OBJECT,
|
||||
absentStates: STATE_UNAVAILABLE,
|
||||
};
|
||||
testElm("object_plugin_windowed", obj);
|
||||
}
|
||||
ok(!isAccessible("object_plugin_windowless"), "(blocked) windowless plugin object element is not accessible");
|
||||
ok(!isAccessible("object_plugin_windowed"), "(blocked) windowed plugin object element is not accessible");
|
||||
|
||||
obj = {
|
||||
role: ROLE_GRAPHIC,
|
||||
|
@ -1481,7 +1457,6 @@
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -351,7 +351,6 @@
|
|||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
|
|
@ -1,77 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Plugin tests</title>
|
||||
<link rel="stylesheet" type="text/css"
|
||||
href="chrome://mochikit/content/tests/SimpleTest/test.css" />
|
||||
|
||||
<script src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
|
||||
|
||||
<script type="application/javascript"
|
||||
src="../common.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../role.js"></script>
|
||||
<script type="application/javascript"
|
||||
src="../states.js"></script>
|
||||
|
||||
<script type="application/javascript">
|
||||
|
||||
function doTest() {
|
||||
if (!WIN) {
|
||||
ok(true,
|
||||
"It's Windows specific test. Feel free to extend the test.");
|
||||
|
||||
SimpleTest.finish();
|
||||
return;
|
||||
}
|
||||
|
||||
testStates("plugin-windowless", STATE_UNAVAILABLE);
|
||||
testAccessibleTree("plugin-windowless", { EMBEDDED_OBJECT: [ ] });
|
||||
|
||||
testStates("plugin-windowless-fallback", STATE_UNAVAILABLE);
|
||||
testAccessibleTree("plugin-windowless-fallback", { EMBEDDED_OBJECT: [ ] });
|
||||
|
||||
testStates("plugin-windowed", 0, 0, STATE_UNAVAILABLE);
|
||||
testAccessibleTree("plugin-windowed", { EMBEDDED_OBJECT: [ { NOTHING: [] } ] });
|
||||
|
||||
testStates("plugin-windowed-fallback", 0, 0, STATE_UNAVAILABLE);
|
||||
testAccessibleTree("plugin-windowed-fallback",
|
||||
{ EMBEDDED_OBJECT: [ { NOTHING: [] } ] });
|
||||
|
||||
// make sure we handle content changes under the plugin.
|
||||
getNode("fallback1").setAttribute("href", "5");
|
||||
getNode("fallback2").setAttribute("href", "5");
|
||||
SimpleTest.executeSoon(function() { SimpleTest.finish(); });
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
addA11yLoadEvent(doTest);
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<a target="_blank"
|
||||
title="Embed and object HTML tags should be given an accessible role of embedded object"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=485270">Bug 485270</a>
|
||||
<a target="_blank"
|
||||
title="Embedded object accessibles for inaccessible/windowless plugins should not expose a NULL child"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=816856">Bug 816856</a>
|
||||
<a target="_blank"
|
||||
title="Updating accessible tree for plugin with fallback shouldn't crash"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=881636">Bug 881636</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none"></div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
|
||||
<embed id="plugin-windowless" type="application/x-test"
|
||||
width="300" height="300"></embed>
|
||||
<embed id="plugin-windowed" type="application/x-test" wmode="window"
|
||||
width="300" height="300"></embed>
|
||||
<embed id="plugin-windowless-fallback" type="application/x-test"
|
||||
width="300" height="300"><a id="fallback1">foo</a></embed>
|
||||
<embed id="plugin-windowed-fallback" type="application/x-test" wmode="window"
|
||||
width="300" height="300"><a id="fallback2">foo</a></embed>
|
||||
</body>
|
||||
</html>
|
|
@ -49,7 +49,6 @@
|
|||
gQueue.push(new takeFocusInvoker("aria-link2"));
|
||||
gQueue.push(new takeFocusInvoker("link"));
|
||||
gQueue.push(new takeFocusInvoker("item2"));
|
||||
gQueue.push(new takeFocusInvoker("plugin"));
|
||||
gQueue.push(new takeFocusInvoker(document));
|
||||
gQueue.push(new takeFocusInvoker("lb_item2"));
|
||||
gQueue.push(new takeFocusInvoker(document));
|
||||
|
@ -60,13 +59,8 @@
|
|||
gQueue.invoke(); // Will call SimpleTest.finish();
|
||||
}
|
||||
|
||||
function waitForPlugin() {
|
||||
window.setTimeout((isAccessible("plugin") ? doTest : waitForPlugin), 0);
|
||||
}
|
||||
|
||||
SimpleTest.waitForExplicitFinish();
|
||||
setTestPluginEnabledState(SpecialPowers.Ci.nsIPluginTag.STATE_ENABLED);
|
||||
addA11yLoadEvent(waitForPlugin);
|
||||
addA11yLoadEvent(doTest);
|
||||
</script>
|
||||
</head>
|
||||
|
||||
|
@ -82,11 +76,6 @@
|
|||
title="nsIAccessible::takeFocus testing">
|
||||
Mozilla Bug 452710
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=646361"
|
||||
title="No focus event fired on document when focus is set to the document while focused in a plugin">
|
||||
Mozilla Bug 646361
|
||||
</a>
|
||||
<a target="_blank"
|
||||
href="https://bugzilla.mozilla.org/show_bug.cgi?id=706067"
|
||||
title="Make takeFocus work on widget items">
|
||||
|
@ -108,8 +97,6 @@
|
|||
<div role="option" id="item3">item3</div>
|
||||
</div>
|
||||
|
||||
<embed id="plugin" type="application/x-test" width="200" height="200" wmode="window"></embed>
|
||||
|
||||
<select id="listbox" size="5">
|
||||
<option id="lb_item1">item1</option>
|
||||
<option id="lb_item2">item2</option>
|
||||
|
|
Загрузка…
Ссылка в новой задаче