Bug 930374 part.4 Fix new orange of test_bug448987.html on Mac since it doesn't set tab navigation setting r=smaug

This commit is contained in:
Masayuki Nakano 2013-12-09 00:51:17 +09:00
parent 3c738145d0
commit 73db2aa3c7
3 changed files with 12 additions and 2 deletions

View File

@ -32,8 +32,9 @@ function focus_area() {
// working directly after page load, hence it is retried 10 times, see bug bug 922524
timer = setInterval(function() {
if (counter > 10) {
clearInterval(timer);
parent.ok(false, "Too often tried to focus image map, giving up");
parent.Simpletest.finish();
parent.finish();
return;
}
synthesizeKey("VK_TAB", { shiftKey: shiftKeyOn }, window);

View File

@ -32,8 +32,9 @@ function focus_area() {
// working directly after page load, hence it is retried 10 times, see bug bug 922524
timer = setInterval(function() {
if (counter > 10) {
clearInterval(timer);
parent.ok(false, "Too often tried to focus image map, giving up");
parent.Simpletest.finish();
parent.finish();
return;
}
synthesizeKey("VK_TAB", { shiftKey: shiftKeyOn }, window);

View File

@ -30,6 +30,8 @@ https://bugzilla.mozilla.org/show_bug.cgi?id=448987
/** Test for Bug 448987 **/
SimpleTest.waitForExplicitFinish();
SpecialPowers.setIntPref("accessibility.tabfocus", 7);
var f1 = document.getElementById("f1");
var f2 = document.getElementById("f2");
var f3 = document.getElementById("f3");
@ -56,6 +58,12 @@ function thirdIframeLoaded() {
ok(compareSnapshots(snapshotf1,
snapshotWindow(f3.contentWindow), false)[0],
"file_bug448987.html should render focus outline, file_bug448987_notref.html should not");
finish();
}
function finish()
{
SpecialPowers.clearUserPref("accessibility.tabfocus");
SimpleTest.finish();
}
</script>