OLD | NEW |
1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex
t + pixel results | 1 // svg/dynamic-updates tests set enablePixelTesting=true, as we want to dump tex
t + pixel results |
2 if (window.testRunner) | 2 if (window.testRunner) { |
3 testRunner.dumpAsText(window.enablePixelTesting); | 3 if (window.enablePixelTesting) |
| 4 testRunner.dumpAsTextWithPixelResults(); |
| 5 else |
| 6 testRunner.dumpAsText(); |
| 7 } |
4 | 8 |
5 function description(msg) | 9 function description(msg) |
6 { | 10 { |
7 // For MSIE 6 compatibility | 11 // For MSIE 6 compatibility |
8 var span = document.createElement("span"); | 12 var span = document.createElement("span"); |
9 span.innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of
"<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST
COMPLETE</span>".</p>'; | 13 span.innerHTML = '<p>' + msg + '</p><p>On success, you will see a series of
"<span class="pass">PASS</span>" messages, followed by "<span class="pass">TEST
COMPLETE</span>".</p>'; |
10 var description = document.getElementById("description"); | 14 var description = document.getElementById("description"); |
11 if (description.firstChild) | 15 if (description.firstChild) |
12 description.replaceChild(span, description.firstChild); | 16 description.replaceChild(span, description.firstChild); |
13 else | 17 else |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 | 318 |
315 function assertEq(left, right, message) | 319 function assertEq(left, right, message) |
316 { | 320 { |
317 if (left === right) | 321 if (left === right) |
318 testPassed(left + " === " + right); | 322 testPassed(left + " === " + right); |
319 else if (message) | 323 else if (message) |
320 testFailed(message); | 324 testFailed(message); |
321 else | 325 else |
322 testFailed("assertEq failed: " + left + "(of type " + (typeof left) + ")
!== " + right + "(of type " + (typeof right) + ")"); | 326 testFailed("assertEq failed: " + left + "(of type " + (typeof left) + ")
!== " + right + "(of type " + (typeof right) + ")"); |
323 } | 327 } |
OLD | NEW |