Skip to content

Commit c72e34f

Browse files
committed
testrunner.htm: minor tweaks.
1 parent a253962 commit c72e34f

File tree

1 file changed

+29
-27
lines changed

1 file changed

+29
-27
lines changed

tests/testrunner.htm

Lines changed: 29 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<title>YUI Test</title>
5-
6-
<!-- JS -->
7-
<script src="../dist/parserlib.js"></script>
8-
<script src="../lib/yuitest.js"></script>
9-
<script src="../dist/parserlib-tests.js"></script>
10-
<style type="text/css">
11-
.passed {
12-
color: green;
13-
}
14-
15-
.failed, .error {
16-
color: red;
17-
}
18-
19-
.ignored {
20-
color: silver;
21-
}
22-
</style>
23-
4+
<meta charset="utf-8">
5+
<title>YUI Test</title>
6+
7+
<style>
8+
.passed {
9+
color: green;
10+
}
11+
12+
.failed, .error {
13+
color: red;
14+
}
15+
16+
.ignored {
17+
color: silver;
18+
}
19+
</style>
20+
21+
<!-- JS -->
22+
<script src="../dist/parserlib.js"></script>
23+
<script src="../lib/yuitest.js"></script>
24+
<script src="../dist/parserlib-tests.js"></script>
2425
</head>
2526
<body>
2627
<div id="doc">
@@ -33,7 +34,7 @@ <h2>Results</h2>
3334
</div>
3435

3536
<script >
36-
(function(){
37+
(function() {
3738

3839
//some helpful variables
3940
var runButton = document.getElementById("run"),
@@ -52,11 +53,11 @@ <h2>Results</h2>
5253
YUITest.TestRunner.ERROR_EVENT
5354
];
5455

55-
for (var i=0; i < events.length; i++){
56-
YUITest.TestRunner.attach(events[i], function(event){
56+
for (var i = 0, len = events.length; i < len; i++) {
57+
YUITest.TestRunner.attach(events[i], function(event) {
5758
var node;
5859

59-
switch(event.type){
60+
switch(event.type) {
6061
case this.BEGIN_EVENT:
6162
message = "Testing began at " + (new Date()).toString() + ".";
6263
messageType = "info";
@@ -105,7 +106,8 @@ <h2>Results</h2>
105106

106107
case this.TEST_CASE_COMPLETE_EVENT:
107108
case this.TEST_SUITE_COMPLETE_EVENT:
108-
resultNode.previousSibling.innerHTML += " (passed: " + event.results.passed + ", failed: " + event.results.failed + ", total: " + event.results.total + ", errors: " + event.results.errors + ", ignored: " + event.results.ignored + ")";
109+
resultNode.previousSibling.innerHTML += " (passed: " + event.results.passed + ", failed: " +
110+
event.results.failed + ", total: " + event.results.total + ", errors: " + event.results.errors + ", ignored: " + event.results.ignored + ")";
109111
resultNode = resultNode.parentNode;
110112
break;
111113

@@ -121,9 +123,9 @@ <h2>Results</h2>
121123
});
122124
}
123125

124-
runButton.onclick = function(){
126+
runButton.onclick = function() {
125127

126-
//reset the interface
128+
// reset the interface
127129
resultsList.innerHTML = "";
128130
resultNode = resultsList;
129131

0 commit comments

Comments
 (0)