| Index: tools/testing/dart/browser_test.dart
|
| diff --git a/tools/testing/dart/browser_test.dart b/tools/testing/dart/browser_test.dart
|
| index 552a7b998c5166052018e26b4ec09b2723220a80..7449dd1cee58a914e7cf6e02dfd5c8dfd668f705 100644
|
| --- a/tools/testing/dart/browser_test.dart
|
| +++ b/tools/testing/dart/browser_test.dart
|
| @@ -23,7 +23,11 @@ String GetHtmlContents(String title,
|
| <script type="text/javascript" src="$controllerScript"></script>
|
| <script type="text/javascript">
|
| // If nobody intercepts the error, finish the test.
|
| - onerror = function() { window.layoutTestController.notifyDone() };
|
| + onerror = function(message, url, lineNumber) {
|
| + if (window.layoutTestController) {
|
| + window.layoutTestController.notifyDone();
|
| + }
|
| + };
|
|
|
| document.onreadystatechange = function() {
|
| if (document.readyState != "loaded") return;
|
|
|