Backed out changeset bc18893041c1 (bug 1176239)

This commit is contained in:
Carsten "Tomcat" Book 2015-07-21 15:21:29 +02:00
parent 86ec37e12f
commit d41297e4d8
2 changed files with 0 additions and 54 deletions

View File

@ -295,7 +295,6 @@ skip-if = true # browser_drag.js is disabled, as it needs to be updated for the
[browser_favicon_change.js]
[browser_favicon_change_not_in_document.js]
[browser_findbarClose.js]
[browser_focusnavigation.js]
[browser_fullscreen-window-open.js]
skip-if = buildapp == 'mulet' || e10s || os == "linux" # Bug 933103 - mochitest's EventUtils.synthesizeMouse functions not e10s friendly. Linux: Intermittent failures - bug 941575.
[browser_fxa_migrate.js]

View File

@ -1,53 +0,0 @@
/*
* This test checks that focus navigation iterates over the browser elements and content page.
*/
function doTab(expectedTarget)
{
let focusEventPromise = BrowserTestUtils.waitForEvent(expectedTarget, "focus", true);
EventUtils.synthesizeKey("VK_TAB", { });
return focusEventPromise;
}
add_task(function* () {
let testPage = "data:text/html,<html id='html1'><body id='body1'>Some Text<input id='input1'></body></html>";
yield BrowserTestUtils.openNewForegroundTab(gBrowser, testPage);
gURLBar.focus();
// Move focus to the searchbar
EventUtils.synthesizeKey("VK_TAB", { });
is(document.activeElement, document.getElementById("searchbar").textbox.inputField, "searchbar focused");
// Set the selection to a specific location, so that focus navigation would
// normally start from there.
yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* (arg) {
let selection = content.document.getSelection();
selection.modify("move", "right", "character");
});
// Move focus to the root element of the document
yield doTab(gBrowser.selectedBrowser);
is(document.activeElement, gBrowser.selectedBrowser, "browser focused");
let focusedId = yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* (arg) {
return content.document.activeElement.id;
});
is(focusedId, "html1", "html focused");
// Move focus to the button in the document
EventUtils.synthesizeKey("VK_TAB", { });
is(document.activeElement, gBrowser.selectedBrowser, "browser still focused");
focusedId = yield ContentTask.spawn(gBrowser.selectedBrowser, { }, function* (arg) {
return content.document.activeElement.id;
});
is(focusedId, "input1", "input focused");
// Move focus and loop back to the tabbar
yield doTab(document);
is(document.activeElement.localName, "tab", "tab focused");
gBrowser.removeCurrentTab();
});