| Index: pkg/unittest/test_controller.js
|
| diff --git a/pkg/unittest/test_controller.js b/pkg/unittest/test_controller.js
|
| index 5a7db1e824a43ec3157f77c055b49f5ffeb26ddf..5332c190554559ef26e289ff9a5c4727951e0fba 100644
|
| --- a/pkg/unittest/test_controller.js
|
| +++ b/pkg/unittest/test_controller.js
|
| @@ -83,12 +83,17 @@ function onLoad(e) {
|
|
|
| window.addEventListener("DOMContentLoaded", onLoad, false);
|
|
|
| -// If nobody intercepts the error, finish the test.
|
| -window.addEventListener("error", function(e) {
|
| +// Note: before renaming this function, note that it is also included in an
|
| +// inlined error handler in the HTML files that wrap DRT tests.
|
| +// See: tools/testing/dart/browser_test.dart
|
| +function externalError(e) {
|
| // needed for dartium compilation errors.
|
| showErrorAndExit(e && e.message);
|
| window.postMessage('unittest-suite-external-error', '*');
|
| -}, false);
|
| +}
|
| +
|
| +// If nobody intercepts the error, finish the test.
|
| +window.addEventListener("error", externalError, false);
|
|
|
| document.addEventListener('readystatechange', function () {
|
| if (document.readyState != "loaded") return;
|
|
|