Bug 651628 - enable media action tests, r=marcoz

--HG--
rename : accessible/tests/mochitest/test_elm_media.html => accessible/tests/mochitest/actions/test_media.html
This commit is contained in:
Alexander Surkov 2011-05-26 21:57:06 +09:00
Родитель 19c686e91f
Коммит 870883441c
4 изменённых файлов: 32 добавлений и 62 удалений

Просмотреть файл

@ -95,7 +95,6 @@ _TEST_FILES =\
test_descr.html \
test_elm_landmarks.html \
test_elm_listbox.xul \
$(warning test_elm_media.html temporarily disabled) \
test_elm_nsApplicationAcc.html \
test_elm_plugin.html \
test_keys.html \

Просмотреть файл

@ -52,6 +52,7 @@ _TEST_FILES =\
test_general.xul \
test_inputs.html \
test_link.html \
test_media.html \
test_tree.xul \
test_treegrid.xul \
$(NULL)

Просмотреть файл

@ -13,15 +13,15 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
<script type="application/javascript"
src="common.js"></script>
src="../common.js"></script>
<script type="application/javascript"
src="events.js"></script>
src="../events.js"></script>
<script type="application/javascript"
src="actions.js"></script>
src="../actions.js"></script>
<script type="application/javascript"
src="role.js"></script>
src="../role.js"></script>
<script type="application/javascript"
src="states.js"></script>
src="../states.js"></script>
<script type="application/javascript">
@ -58,49 +58,11 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
function doTest()
{
//////////////////////////////////////////////////////////////////////////
// test the accessible tree
var accTree = {
role: ROLE_GROUPING,
children: [
{ // start/stop button
role: ROLE_PUSHBUTTON,
name: "Play",
states: {
states: STATE_FOCUSABLE
}
},
{ // buffer bar
role: ROLE_PROGRESSBAR
},
{ // progress bar
role: ROLE_PROGRESSBAR
},
{ // slider of progress bar
role: ROLE_SLIDER,
name: "0:00 of 0:01 elapsed",
states: {
states: STATE_FOCUSABLE
}
},
{ // duration label, role="presentation"
role: ROLE_NOTHING
},
{ // mute button
role: ROLE_PUSHBUTTON,
name: "Mute",
states: {
states: STATE_FOCUSABLE
}
}
]
};
testAccessibleTree("audio", accTree);
//////////////////////////////////////////////////////////////////////////
// test actions of audio controls
todo(false, "Focus test are disabled until bug 494175 is fixed.");
var audioElm = getAccessible("audio");
var playBtn = audioElm.firstChild;
var scrubber = playBtn.nextSibling.nextSibling.nextSibling;
@ -112,24 +74,24 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
actionName: "press",
events: CLICK_EVENTS,
eventSeq: [
new focusChecker(muteBtn),
// new focusChecker(muteBtn),
new nameChecker(muteBtn, "Unmute"),
]
},
{
ID: scrubber,
actionName: "activate",
events: null,
eventSeq: [
new focusChecker(scrubber)
]
},
// {
// ID: scrubber,
// actionName: "activate",
// events: null,
// eventSeq: [
// new focusChecker(scrubber)
// ]
// },
{
ID: playBtn,
actionName: "press",
events: CLICK_EVENTS,
eventSeq: [
new focusChecker(playBtn),
// new focusChecker(playBtn),
new nameChecker(playBtn, "Pause"),
]
}
@ -152,7 +114,7 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
<pre id="test">
</pre>
<audio id="audio" src="bug461281.ogg"
<audio id="audio" src="../bug461281.ogg"
controls="true"></audio>
<div id="eventDump"></div>

Просмотреть файл

@ -30,19 +30,27 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=483573
role: ROLE_GROUPING,
children: [
{ // start/stop button
role: ROLE_PUSHBUTTON
role: ROLE_PUSHBUTTON,
name: "Play",
children: []
},
{ // buffer bar
role: ROLE_PROGRESSBAR
role: ROLE_PROGRESSBAR,
children: []
},
{ // progress bar
role: ROLE_PROGRESSBAR
role: ROLE_PROGRESSBAR,
children: []
},
{ // slider of progress bar
role: ROLE_SLIDER
role: ROLE_SLIDER,
name: "0:00 of 0:02 elapsed",
children: []
},
{ // mute button
role: ROLE_PUSHBUTTON
role: ROLE_PUSHBUTTON,
name: "Mute",
children: []
}
]
};