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

Unified Diff: dart/pkg/unittest/test_controller.js

Issue 11358039: Lightweight asynchronous test helper. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Update test expectations Created 8 years, 1 month 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 | dart/tests/compiler/dart2js_extra/async_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/unittest/test_controller.js
diff --git a/dart/pkg/unittest/test_controller.js b/dart/pkg/unittest/test_controller.js
index 94c9f2fe1b2682c3aae4ff9dc97283fd743ad1a5..5a7db1e824a43ec3157f77c055b49f5ffeb26ddf 100644
--- a/dart/pkg/unittest/test_controller.js
+++ b/dart/pkg/unittest/test_controller.js
@@ -14,7 +14,12 @@ if (typeof console == "object" && typeof console.clear == "function") {
// 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");
+ if (url) {
+ showErrorAndExit(
+ "\n\n" + url + ":" + lineNumber + ":\n" + message + "\n\n");
+ } else {
+ showErrorAndExit(message);
+ }
window.postMessage('unittest-suite-external-error', '*');
};
« no previous file with comments | « no previous file | dart/tests/compiler/dart2js_extra/async_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698