diff --git a/test/qunit.css b/test/qunit.css
index e43788e..66f6535 100644
--- a/test/qunit.css
+++ b/test/qunit.css
@@ -1,9 +1,9 @@
/**
* QUnit - A JavaScript Unit Testing Framework
- *
+ *
* http://docs.jquery.com/QUnit
*
- * Copyright (c) 2011 John Resig, Jrn Zaefferer
+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
*/
@@ -11,7 +11,7 @@
/** Font Family and Sizes */
#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
- font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
}
#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
@@ -21,133 +21,133 @@
/** Resets */
#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
- margin: 0;
- padding: 0;
+ margin: 0;
+ padding: 0;
}
/** Header */
#qunit-header {
- padding: 0.5em 0 0.5em 1em;
+ padding: 0.5em 0 0.5em 1em;
+
+ color: #8699a4;
+ background-color: #0d3349;
- color: #8699a4;
- background-color: #0d3349;
+ font-size: 1.5em;
+ line-height: 1em;
+ font-weight: normal;
- font-size: 1.5em;
- line-height: 1em;
- font-weight: normal;
-
- border-radius: 15px 15px 0 0;
- -moz-border-radius: 15px 15px 0 0;
- -webkit-border-top-right-radius: 15px;
- -webkit-border-top-left-radius: 15px;
+ border-radius: 15px 15px 0 0;
+ -moz-border-radius: 15px 15px 0 0;
+ -webkit-border-top-right-radius: 15px;
+ -webkit-border-top-left-radius: 15px;
}
#qunit-header a {
- text-decoration: none;
- color: #c2ccd1;
+ text-decoration: none;
+ color: #c2ccd1;
}
#qunit-header a:hover,
#qunit-header a:focus {
- color: #fff;
+ color: #fff;
}
#qunit-banner {
- height: 5px;
+ height: 5px;
}
#qunit-testrunner-toolbar {
- padding: 0.5em 0 0.5em 2em;
- color: #5E740B;
- background-color: #eee;
+ padding: 0.5em 0 0.5em 2em;
+ color: #5E740B;
+ background-color: #eee;
}
#qunit-userAgent {
- padding: 0.5em 0 0.5em 2.5em;
- background-color: #2b81af;
- color: #fff;
- text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+ padding: 0.5em 0 0.5em 2.5em;
+ background-color: #2b81af;
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
}
/** Tests: Pass/Fail */
#qunit-tests {
- list-style-position: inside;
+ list-style-position: inside;
}
#qunit-tests li {
- padding: 0.4em 0.5em 0.4em 2.5em;
- border-bottom: 1px solid #fff;
- list-style-position: inside;
+ padding: 0.4em 0.5em 0.4em 2.5em;
+ border-bottom: 1px solid #fff;
+ list-style-position: inside;
}
#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
- display: none;
+ display: none;
}
#qunit-tests li strong {
- cursor: pointer;
+ cursor: pointer;
}
#qunit-tests li a {
- padding: 0.5em;
- color: #c2ccd1;
- text-decoration: none;
+ padding: 0.5em;
+ color: #c2ccd1;
+ text-decoration: none;
}
#qunit-tests li a:hover,
#qunit-tests li a:focus {
- color: #000;
+ color: #000;
}
#qunit-tests ol {
- margin-top: 0.5em;
- padding: 0.5em;
-
- background-color: #fff;
-
- border-radius: 15px;
- -moz-border-radius: 15px;
- -webkit-border-radius: 15px;
-
- box-shadow: inset 0px 2px 13px #999;
- -moz-box-shadow: inset 0px 2px 13px #999;
- -webkit-box-shadow: inset 0px 2px 13px #999;
+ margin-top: 0.5em;
+ padding: 0.5em;
+
+ background-color: #fff;
+
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+
+ box-shadow: inset 0px 2px 13px #999;
+ -moz-box-shadow: inset 0px 2px 13px #999;
+ -webkit-box-shadow: inset 0px 2px 13px #999;
}
#qunit-tests table {
- border-collapse: collapse;
- margin-top: .2em;
+ border-collapse: collapse;
+ margin-top: .2em;
}
#qunit-tests th {
- text-align: right;
- vertical-align: top;
- padding: 0 .5em 0 0;
+ text-align: right;
+ vertical-align: top;
+ padding: 0 .5em 0 0;
}
#qunit-tests td {
- vertical-align: top;
+ vertical-align: top;
}
#qunit-tests pre {
- margin: 0;
- white-space: pre-wrap;
- word-wrap: break-word;
+ margin: 0;
+ white-space: pre-wrap;
+ word-wrap: break-word;
}
#qunit-tests del {
- background-color: #e0f2be;
- color: #374e0c;
- text-decoration: none;
+ background-color: #e0f2be;
+ color: #374e0c;
+ text-decoration: none;
}
#qunit-tests ins {
- background-color: #ffcaca;
- color: #500;
- text-decoration: none;
+ background-color: #ffcaca;
+ color: #500;
+ text-decoration: none;
}
/*** Test Counts */
@@ -157,24 +157,24 @@
#qunit-tests b.failed { color: #710909; }
#qunit-tests li li {
- margin: 0.5em;
- padding: 0.4em 0.5em 0.4em 0.5em;
- background-color: #fff;
- border-bottom: none;
- list-style-position: inside;
+ margin: 0.5em;
+ padding: 0.4em 0.5em 0.4em 0.5em;
+ background-color: #fff;
+ border-bottom: none;
+ list-style-position: inside;
}
/*** Passing Styles */
#qunit-tests li li.pass {
- color: #5E740B;
- background-color: #fff;
- border-left: 26px solid #C6E746;
+ color: #5E740B;
+ background-color: #fff;
+ border-left: 26px solid #C6E746;
}
#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
#qunit-tests .pass .test-name { color: #366097; }
-
+
#qunit-tests .pass .test-actual,
#qunit-tests .pass .test-expected { color: #999999; }
@@ -183,16 +183,16 @@
/*** Failing Styles */
#qunit-tests li li.fail {
- color: #710909;
- background-color: #fff;
- border-left: 26px solid #EE5757;
+ color: #710909;
+ background-color: #fff;
+ border-left: 26px solid #EE5757;
}
#qunit-tests > li:last-child {
- 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;
+ 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;
}
#qunit-tests .fail { color: #000000; background-color: #EE5757; }
@@ -208,18 +208,18 @@
/** Result */
#qunit-testresult {
- padding: 0.5em 0.5em 0.5em 2.5em;
+ padding: 0.5em 0.5em 0.5em 2.5em;
- color: #2b81af;
- background-color: #D2E0E6;
+ color: #2b81af;
+ background-color: #D2E0E6;
- border-bottom: 1px solid white;
+ border-bottom: 1px solid white;
}
/** Fixture */
#qunit-fixture {
- position: absolute;
- top: -10000px;
- left: -10000px;
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
}
diff --git a/test/qunit.js b/test/qunit.js
index 9423127..eac357b 100644
--- a/test/qunit.js
+++ b/test/qunit.js
@@ -1,9 +1,9 @@
/**
* QUnit - A JavaScript Unit Testing Framework
- *
+ *
* http://docs.jquery.com/QUnit
*
- * Copyright (c) 2011 John Resig, Jörn Zaefferer
+ * Copyright (c) 2011 John Resig, Jörn Zaefferer
* Dual licensed under the MIT (MIT-LICENSE.txt)
* or GPL (GPL-LICENSE.txt) licenses.
*/
@@ -78,7 +78,7 @@ Test.prototype = {
// allow utility functions to access the current test environment
// TODO why??
QUnit.current_testEnvironment = this.testEnvironment;
-
+
try {
if ( !config.pollution ) {
saveGlobal();
@@ -114,8 +114,8 @@ Test.prototype = {
},
teardown: function() {
try {
- checkPollution();
this.testEnvironment.teardown.call(this.testEnvironment);
+ checkPollution();
} catch(e) {
QUnit.ok( false, "Teardown failed on " + this.testName + ": " + e.message );
}
@@ -124,7 +124,7 @@ Test.prototype = {
if ( this.expected && this.expected != this.assertions.length ) {
QUnit.ok( false, "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run" );
}
-
+
var good = 0, bad = 0,
tests = id("qunit-tests");
@@ -166,17 +166,17 @@ Test.prototype = {
var b = document.createElement("strong");
b.innerHTML = this.name + " (" + bad + ", " + good + ", " + this.assertions.length + ")";
-
+
var a = document.createElement("a");
a.innerHTML = "Rerun";
a.href = QUnit.url({ filter: getText([b]).replace(/\([^)]+\)$/, "").replace(/(^\s*|\s*$)/g, "") });
-
+
addEvent(b, "click", function() {
var next = b.nextSibling.nextSibling,
display = next.style.display;
next.style.display = display === "none" ? "block" : "none";
});
-
+
addEvent(b, "dblclick", function(e) {
var target = e && e.target ? e.target : window.event.srcElement;
if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
@@ -217,7 +217,7 @@ Test.prototype = {
total: this.assertions.length
} );
},
-
+
queue: function() {
var test = this;
synchronize(function() {
@@ -246,7 +246,7 @@ Test.prototype = {
synchronize(run);
};
}
-
+
};
var QUnit = {
@@ -265,7 +265,7 @@ var QUnit = {
QUnit.test(testName, expected, callback, true);
},
-
+
test: function(testName, expected, callback, async) {
var name = '' + testName + '', testEnvironmentArg;
@@ -286,13 +286,13 @@ var QUnit = {
if ( !validTest(config.currentModule + ": " + testName) ) {
return;
}
-
+
var test = new Test(name, testName, expected, testEnvironmentArg, async, callback);
test.module = config.currentModule;
test.moduleTestEnvironment = config.currentModuleTestEnviroment;
test.queue();
},
-
+
/**
* Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
*/
@@ -337,7 +337,7 @@ var QUnit = {
notEqual: function(actual, expected, message) {
QUnit.push(expected != actual, actual, expected, message);
},
-
+
deepEqual: function(actual, expected, message) {
QUnit.push(QUnit.equiv(actual, expected), actual, expected, message);
},
@@ -356,34 +356,34 @@ var QUnit = {
raises: function(block, expected, message) {
var actual, ok = false;
-
+
if (typeof expected === 'string') {
message = expected;
expected = null;
}
-
+
try {
block();
} catch (e) {
actual = e;
}
-
+
if (actual) {
// we don't want to validate thrown error
if (!expected) {
ok = true;
- // expected is a regexp
+ // expected is a regexp
} else if (QUnit.objectType(expected) === "regexp") {
ok = expected.test(actual);
- // expected is a constructor
+ // expected is a constructor
} else if (actual instanceof expected) {
ok = true;
- // expected is a validation function which returns true is validation passed
+ // expected is a validation function which returns true is validation passed
} else if (expected.call({}, actual) === true) {
ok = true;
}
}
-
+
QUnit.ok(ok, message);
},
@@ -412,7 +412,7 @@ var QUnit = {
process();
}
},
-
+
stop: function(timeout) {
config.semaphore++;
config.blocking = true;
@@ -438,7 +438,7 @@ var config = {
// block until document ready
blocking: true,
-
+
// by default, run previously failed tests first
// very useful in combination with "Hide passed tests" checked
reorder: true,
@@ -519,7 +519,7 @@ extend(QUnit, {
if ( result ) {
result.parentNode.removeChild( result );
}
-
+
if ( tests ) {
result = document.createElement( "p" );
result.id = "qunit-testresult";
@@ -528,10 +528,10 @@ extend(QUnit, {
result.innerHTML = 'Running...
';
}
},
-
+
/**
* Resets the test setup. Useful for tests that modify the DOM.
- *
+ *
* If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
*/
reset: function() {
@@ -544,7 +544,7 @@ extend(QUnit, {
}
}
},
-
+
/**
* Trigger an event on an element.
*
@@ -564,12 +564,12 @@ extend(QUnit, {
elem.fireEvent("on"+type);
}
},
-
+
// Safe object type checking
is: function( type, obj ) {
return QUnit.objectType( obj ) == type;
},
-
+
objectType: function( obj ) {
if (typeof obj === "undefined") {
return "undefined";
@@ -603,7 +603,7 @@ extend(QUnit, {
}
return undefined;
},
-
+
push: function(result, actual, expected, message) {
var details = {
result: result,
@@ -611,7 +611,7 @@ extend(QUnit, {
actual: actual,
expected: expected
};
-
+
message = escapeHtml(message) || (result ? "okay" : "failed");
message = ' ";
expected = escapeHtml(QUnit.jsDump.parse(expected));
@@ -625,19 +625,19 @@ extend(QUnit, {
var source = sourceFromStacktrace();
if (source) {
details.source = source;
- output += '
' + source +'
' + escapeHtml(source) + '