зеркало из https://github.com/mozilla/gecko-dev.git
Родитель
158422604c
Коммит
0119e12256
|
@ -8,6 +8,10 @@
|
|||
* * Support the Test.Simple API used by MochiKit, to be able to test MochiKit
|
||||
* itself against IE 5.5
|
||||
*
|
||||
* NOTE: Pay attention to cross-browser compatibility in this file. For
|
||||
* instance, do not use const or JS > 1.5 features which are not yet
|
||||
* implemented everywhere.
|
||||
*
|
||||
**/
|
||||
|
||||
if (typeof(SimpleTest) == "undefined") {
|
||||
|
@ -549,7 +553,7 @@ var todo_is = SimpleTest.todo_is;
|
|||
var todo_isnot = SimpleTest.todo_isnot;
|
||||
var isDeeply = SimpleTest.isDeeply;
|
||||
|
||||
const gOldOnError = window.onerror;
|
||||
var gOldOnError = window.onerror;
|
||||
window.onerror = function simpletestOnerror(errorMsg, url, lineNumber) {
|
||||
var funcIdentifier = "[SimpleTest/SimpleTest.js, window.onerror] ";
|
||||
|
||||
|
|
|
@ -201,7 +201,9 @@ TestRunner.countResults = function(doc) {
|
|||
}
|
||||
|
||||
TestRunner.updateUI = function() {
|
||||
var results = TestRunner.countResults($('testframe').contentDocument);
|
||||
var testFrame = $('testframe');
|
||||
var results = TestRunner.countResults(testFrame.contentDocument ||
|
||||
testFrame.contentWindow.document);
|
||||
var passCount = parseInt($("pass-count").innerHTML) + results.OK;
|
||||
var failCount = parseInt($("fail-count").innerHTML) + results.notOK;
|
||||
var todoCount = parseInt($("todo-count").innerHTML) + results.todo;
|
||||
|
@ -227,9 +229,9 @@ TestRunner.updateUI = function() {
|
|||
var row = $(trID);
|
||||
var tds = row.getElementsByTagName("td");
|
||||
tds[0].style.backgroundColor = "#0d0";
|
||||
tds[0].textContent = results.OK;
|
||||
tds[0].innerHTML = results.OK;
|
||||
tds[1].style.backgroundColor = results.notOK > 0 ? "red" : "#0d0";
|
||||
tds[1].textContent = results.notOK;
|
||||
tds[1].innerHTML = results.notOK;
|
||||
tds[2].style.backgroundColor = results.todo > 0 ? "orange" : "#0d0";
|
||||
tds[2].textContent = results.todo;
|
||||
tds[2].innerHTML = results.todo;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче