Permalink
Browse files

Upped QUnit to fix test running under IE

  • Loading branch information...
rmm5t committed Oct 26, 2010
1 parent 0de3500 commit 9ba708c4bd9bccdefdc84bb67e327185049de152
Showing with 21 additions and 19 deletions.
  1. +19 −17 test/qunit.css
  2. +2 −2 test/qunit.js
View
@@ -10,7 +10,7 @@
/** Resets */
-#qunit-tests, #qunit-tests li ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
margin: 0;
padding: 0;
}
@@ -68,7 +68,7 @@
cursor: pointer;
}
-#qunit-tests li ol {
+#qunit-tests ol {
margin-top: 0.5em;
padding: 0.5em;
@@ -83,6 +83,12 @@
-webkit-box-shadow: inset 0px 2px 13px #999;
}
+/*** Test Counts */
+
+#qunit-tests b.counts { color: black; }
+#qunit-tests b.passed { color: #5E740B; }
+#qunit-tests b.failed { color: #710909; }
+
#qunit-tests li li {
margin: 0.5em;
padding: 0.4em 0.5em 0.4em 0.5em;
@@ -99,13 +105,11 @@
border-left: 26px solid #C6E746;
}
-#qunit-tests li.pass { color: #528CE0; background-color: #D2E0E6; }
-#qunit-tests li.pass span.test-name { color: #366097; }
+#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests .pass .test-name { color: #366097; }
-#qunit-tests li li.pass span.test-actual,
-#qunit-tests li li.pass span.test-expected { color: #999999; }
-
-strong b.pass { color: #5E740B; }
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
#qunit-banner.qunit-pass { background-color: #C6E746; }
@@ -117,14 +121,12 @@ strong b.pass { color: #5E740B; }
border-left: 26px solid #EE5757;
}
-#qunit-tests li.fail { color: #000000; background-color: #EE5757; }
-#qunit-tests li.fail span.test-name,
-#qunit-tests li.fail span.module-name { color: #000000; }
+#qunit-tests .fail { color: #000000; background-color: #EE5757; }
+#qunit-tests .fail .test-name,
+#qunit-tests .fail .module-name { color: #000000; }
-#qunit-tests li li.fail span.test-actual { color: #EE5757; }
-#qunit-tests li li.fail span.test-expected { color: green; }
-
-strong b.fail { color: #710909; }
+#qunit-tests .fail .test-actual { color: #EE5757; }
+#qunit-tests .fail .test-expected { color: green; }
#qunit-banner.qunit-fail,
#qunit-testrunner-toolbar { background-color: #EE5757; }
@@ -134,14 +136,14 @@ strong b.fail { color: #710909; }
#qunit-testresult {
padding: 0.5em 0.5em 0.5em 2.5em;
-
+
color: #2b81af;
background-color: #D2E0E6;
border-radius: 0 0 15px 15px;
-moz-border-radius: 0 0 15px 15px;
-webkit-border-bottom-right-radius: 15px;
- -webkit-border-bottom-left-radius: 15px;
+ -webkit-border-bottom-left-radius: 15px;
}
/** Fixture */
View
@@ -131,7 +131,7 @@ var QUnit = {
try {
QUnit.reset();
} catch(e) {
- fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, reset);
+ fail("reset() failed, following Test " + name + ", exception and reset fn follows", e, QUnit.reset);
}
if ( config.expected && config.expected != config.assertions.length ) {
@@ -168,7 +168,7 @@ var QUnit = {
}
var b = document.createElement("strong");
- b.innerHTML = name + " <b style='color:black;'>(<b class='fail'>" + bad + "</b>, <b class='pass'>" + good + "</b>, " + config.assertions.length + ")</b>";
+ b.innerHTML = name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + config.assertions.length + ")</b>";
addEvent(b, "click", function() {
var next = b.nextSibling, display = next.style.display;

0 comments on commit 9ba708c

Please sign in to comment.