Bug 491624 - [SeaMonkey, Linux] mochitest-browser-chrome: intermittent ".../suite/browser/test/browser_bug462289.js | tab key to tab activeElement - Got [object HTMLInputElement], expected [object XULElement]"; (Bv2a) Undo 3 non-helping hacks, Use todo_is() ftb; r=neil
This commit is contained in:
Родитель
88ea68987f
Коммит
d1971abc9f
|
@ -27,23 +27,23 @@ function step3()
|
||||||
todo_is(document.activeElement, tab1, "mouse on tab again activeElement");
|
todo_is(document.activeElement, tab1, "mouse on tab again activeElement");
|
||||||
|
|
||||||
document.getElementById("urlbar").inputField.focus();
|
document.getElementById("urlbar").inputField.focus();
|
||||||
// give tab key a chance to settle
|
|
||||||
setTimeout(step3a, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function step3a()
|
|
||||||
{
|
|
||||||
is(document.activeElement.localName, "input", "focus URL bar activeElement");
|
|
||||||
|
|
||||||
EventUtils.synthesizeKey("VK_TAB", { });
|
EventUtils.synthesizeKey("VK_TAB", { });
|
||||||
// give tab key a chance to settle
|
|
||||||
setTimeout(step3b, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
function step3b()
|
let osString = Components.classes["@mozilla.org/xre/app-info;1"]
|
||||||
{
|
.getService(Ci.nsIXULRuntime).OS;
|
||||||
is(document.activeElement.localName, "tab", "tab key to tab activeElement");
|
if (osString != "Linux" || document.activeElement == tab1) {
|
||||||
is(document.activeElement, tab1, "tab key to tab activeElement");
|
// Expected behavior.
|
||||||
|
is(document.activeElement, tab1, "tab key to tab activeElement");
|
||||||
|
} else {
|
||||||
|
// Linux intermittent failure.
|
||||||
|
// Check local name too to help diagnose bug 491624.
|
||||||
|
todo_is(document.activeElement.localName, "tab",
|
||||||
|
"tab key to tab activeElement (bug 491624: name = " +
|
||||||
|
document.activeElement.localName + ")");
|
||||||
|
todo_is(document.activeElement, tab1,
|
||||||
|
"tab key to tab activeElement (bug 491624: object = " +
|
||||||
|
document.activeElement + ")");
|
||||||
|
}
|
||||||
|
|
||||||
EventUtils.synthesizeMouse(tab1, 9, 9, {});
|
EventUtils.synthesizeMouse(tab1, 9, 9, {});
|
||||||
setTimeout(step4, 0);
|
setTimeout(step4, 0);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче