From 9ba708c4bd9bccdefdc84bb67e327185049de152 Mon Sep 17 00:00:00 2001 From: Ryan McGeary Date: Tue, 26 Oct 2010 19:47:24 -0400 Subject: [PATCH] Upped QUnit to fix test running under IE --- test/qunit.css | 36 +++++++++++++++++++----------------- test/qunit.js | 4 ++-- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/test/qunit.css b/test/qunit.css index a4daa27..e9404f5 100644 --- a/test/qunit.css +++ b/test/qunit.css @@ -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 */ diff --git a/test/qunit.js b/test/qunit.js index 45ad1dc..070f6b7 100644 --- a/test/qunit.js +++ b/test/qunit.js @@ -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 + " (" + bad + ", " + good + ", " + config.assertions.length + ")"; + b.innerHTML = name + " (" + bad + ", " + good + ", " + config.assertions.length + ")"; addEvent(b, "click", function() { var next = b.nextSibling, display = next.style.display;