Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(99)

Unified Diff: pkg/unittest/test_controller.js

Issue 11339039: Add additional test harness error handling to test_controller. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698