Refactored ajax module: Dropped internal arguments from ajax(); Modified testsuite to improve display

This commit is contained in:
Jörn Zaefferer 2006-11-03 11:30:57 +00:00
parent e9917ab837
commit 7b780def0d
3 changed files with 78 additions and 49 deletions

View file

@ -43,8 +43,9 @@ function runTest(tests) {
synchronize(function() {
var runTime = new Date() - startTime;
var result = document.createElement("div");
result.innerHTML = 'Tests completed in ' + runTime + ' milliseconds.<br/>' +
stats.bad + ' tests of ' + stats.all + ' failed.';
result.innerHTML = '<p class="result">Tests completed in ' +
runTime + ' milliseconds.<br/>' +
stats.bad + ' tests of ' + stats.all + ' failed.</p>';
document.getElementsByTagName("body")[0].appendChild(result);
});
}
@ -68,7 +69,7 @@ function test(name, callback) {
var good = 0, bad = 0;
var ol = document.createElement("ol");
ol.style.display = "none";
var li = "", state = "pass";
for ( var i = 0; i < Test.length; i++ ) {
var li = document.createElement("li");

View file

@ -5,4 +5,4 @@ h2 { padding: 10px; background-color: #eee; color: black; margin: 0; font-size:
.pass { color: green; }
.fail { color: red; }
#tests ol { display: none; margin-left: 1em; }
p.result { margin-left: 1em; }