зеркало из https://github.com/mozilla/pjs.git
Bug 442125: Attempt to fix focus test failures, add more info to message if it still fails. r=ted
This commit is contained in:
Родитель
9d5badf74d
Коммит
7aec8416db
|
@ -71,6 +71,7 @@ TestRunner._toggle = function(el) {
|
|||
**/
|
||||
TestRunner._makeIframe = function (url, retry) {
|
||||
var iframe = $('testframe');
|
||||
window.scrollTo(0, $('indicator').offsetTop);
|
||||
if (url != "about:blank" && (!document.hasFocus() ||
|
||||
document.activeElement != iframe)) {
|
||||
// typically calling ourselves from setTimeout is sufficient
|
||||
|
@ -84,9 +85,10 @@ TestRunner._makeIframe = function (url, retry) {
|
|||
|
||||
var frameWindow = $('testframe').contentWindow.wrappedJSObject ||
|
||||
$('testframe').contentWindow;
|
||||
frameWindow.SimpleTest.ok(false, "Unable to restore focus, expect failures and timeouts.");
|
||||
frameWindow.SimpleTest.ok(false, "Unable to restore focus ("+
|
||||
(document.hasFocus() ? document.activeElement : "[none]")+
|
||||
"), expect failures and timeouts.");
|
||||
}
|
||||
window.scrollTo(0, $('indicator').offsetTop);
|
||||
iframe.src = url;
|
||||
iframe.name = url;
|
||||
iframe.width = "500";
|
||||
|
|
Загрузка…
Ссылка в новой задаче