aboutsummaryrefslogtreecommitdiff
path: root/chrome/content/unittests.html
diff options
context:
space:
mode:
authorEinar Egilsson2009-09-15 08:00:03 +0000
committerEinar Egilsson2009-09-15 08:00:03 +0000
commit50d488f4c2137206e63f291ff99c4f09d177d31d (patch)
tree9b98d5382de8803c00fbeb5a32041fa43582cc0f /chrome/content/unittests.html
parent0225b1c8035a1c03dafa4c971d21facc76dbc2de (diff)
Fixed the wildcard match and added a bunch of unit tests.
git-svn-id: http://einaregilsson.googlecode.com/svn/mozilla/redirector/trunk@247 119bf307-c92d-0410-89bd-8f53e6181181
Diffstat (limited to 'chrome/content/unittests.html')
-rw-r--r--chrome/content/unittests.html10
1 files changed, 6 insertions, 4 deletions
diff --git a/chrome/content/unittests.html b/chrome/content/unittests.html
index 1f84455..cee8488 100644
--- a/chrome/content/unittests.html
+++ b/chrome/content/unittests.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:20px 0px; }
- table { margin:auto; border:solid 1px black; width:500px; border-collapse:collapse;}
+ table { margin: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; }
@@ -45,6 +45,7 @@
}
function setup() {
+ try{
var tables = document.getElementsByTagName('table');
for (var i = 0; i < tables.length; i++) {
tables[i].parentNode.removeChild(tables[i]);
@@ -56,6 +57,7 @@
for (var name in tests) {
setupTest(name, tests[name]);
}
+ }catch(e){alert(e);}
}
function runTests() {
@@ -65,12 +67,12 @@
try {
var result = testcase.run(testcase.tests[i]);
if (result) {
- document.getElementById(testcaseName + '_' + i).style.backgroundColor = 'green';
+ document.getElementById(testcaseName + '_' + i).style.backgroundColor = '#17f816';
} else {
- document.getElementById(testcaseName + '_' + i).style.backgroundColor = 'red';
+ document.getElementById(testcaseName + '_' + i).style.backgroundColor = '#ff0000';
}
} catch(e) {
- document.getElementById(testcaseName + '_' + i).style.backgroundColor = 'red';
+ document.getElementById(testcaseName + '_' + i).style.backgroundColor = '#ff0000';
}
}
}