Chromium Code Reviews| Index: pkg/unittest/test_controller.js |
| =================================================================== |
| --- pkg/unittest/test_controller.js (revision 14244) |
| +++ pkg/unittest/test_controller.js (working copy) |
| @@ -7,6 +7,18 @@ |
| * DumpRenderTree. |
| */ |
| +// Clear the console before every test run. |
| +if (typeof console == "object" && typeof console.clear == "function") { |
| + console.clear(); |
|
ahe
2012/10/30 09:48:51
Unfortunately, I only think this works in Firebug.
|
| +} |
| + |
| +// Set window onerror to make sure that we catch test harness errors across all |
| +// browsers. |
| +window.onerror = function (message, url, lineNumber) { |
| + showErrorAndExit("\n\n" + url + ":" + lineNumber + ":\n" + message + "\n\n"); |
| + window.postMessage('unittest-suite-external-error', '*'); |
| +}; |
| + |
| if (navigator.webkitStartDart) { |
| navigator.webkitStartDart(); |
| } |