aboutsummaryrefslogtreecommitdiff
path: root/chrome/content/unittest/run.html
diff options
context:
space:
mode:
authorEinar Egilsson2009-10-07 11:24:44 +0000
committerEinar Egilsson2009-10-07 11:24:44 +0000
commita703799580a208beac24c827fcd54b799f46a3d7 (patch)
tree5dc5b71933534189abee7bd4c40f26fbaa0c125d /chrome/content/unittest/run.html
parent96966ca83f96ed1babcd2bd23aa68feb63fbb7a7 (diff)
Finally working normally again after massive refactoring.
Disabling single redirects works but needs more GUI work. Added Redirector log file since the Error Console keeps deleting our messages. git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@253 119bf307-c92d-0410-89bd-8f53e6181181
Diffstat (limited to 'chrome/content/unittest/run.html')
-rw-r--r--chrome/content/unittest/run.html18
1 files changed, 12 insertions, 6 deletions
diff --git a/chrome/content/unittest/run.html b/chrome/content/unittest/run.html
index 2c4f968..5658137 100644
--- a/chrome/content/unittest/run.html
+++ b/chrome/content/unittest/run.html
@@ -6,7 +6,7 @@
body { font-family: Verdana, Arial; color:black; background-color:white; font-size:0.8em; width:800px; margin:auto; text-align:center;}
a { color:blue; }
h1 { text-align:center; margin:10px 0px; }
- table { margin:auto; border:solid 1px black; width:700px; border-collapse:collapse;}
+ table { margin:10px auto; border:solid 1px black; width:700px; border-collapse:collapse;}
td { border:solid 1px black; padding:3px; }
td.result { width:20px; height:20px; padding:0;}
td.result div { width:70%; height:70%; margin:auto; }
@@ -50,7 +50,7 @@
for (var i = 0; i < tables.length; i++) {
tables[i].parentNode.removeChild(tables[i]);
}
-
+ subscriptLoader.loadSubScript('chrome://redirector/content/code/redirect.js');
subscriptLoader.loadSubScript('chrome://redirector/content/unittest/testcases.js');
redirector.reload();
@@ -64,14 +64,20 @@
var testcase = tests[testcaseName];
for (var i = 0; i < testcase.tests.length; i++) {
try {
+ var dot = document.getElementById(testcaseName + '_' + i);
var result = testcase.run(testcase.tests[i]);
- if (result) {
- document.getElementById(testcaseName + '_' + i).style.backgroundColor = '#17f816';
+ if (result && result.passed) {
+ dot.style.backgroundColor = '#17f816';
} else {
- document.getElementById(testcaseName + '_' + i).style.backgroundColor = '#ff0000';
+ dot.style.backgroundColor = '#ff0000';
+ if (result && result.message) {
+ dot.parentNode.nextSibling.innerHTML += '<br/><span style="color:red;">' + result.message + '</span>';
+ }
}
} catch(e) {
- document.getElementById(testcaseName + '_' + i).style.backgroundColor = '#ff0000';
+ dot.style.backgroundColor = '#ff0000';
+ dot.parentNode.nextSibling.innerHTML += '<br/><span style="color:red;">' + e + '</span>';
+ ;
}
}
}