Chromium Code Reviews| Index: pkg/unittest/lib/html_config.dart |
| diff --git a/pkg/unittest/lib/html_config.dart b/pkg/unittest/lib/html_config.dart |
| index e4eba0f54b2507c5445fb827d73724fec38a813c..860ec4fa73d753831f59e4f840acffa17fb5b34f 100644 |
| --- a/pkg/unittest/lib/html_config.dart |
| +++ b/pkg/unittest/lib/html_config.dart |
| @@ -10,6 +10,7 @@ library unittest_html_config; |
| import 'dart:async'; |
| import 'dart:convert'; |
| import 'dart:html'; |
| +import 'dart:js' as js; |
| import 'unittest.dart'; |
| /** Creates a table showing tests results in HTML. */ |
| @@ -100,7 +101,12 @@ class HtmlConfiguration extends SimpleConfiguration { |
| void _installHandlers() { |
| if (_onErrorSubscription == null) { |
| _onErrorSubscription = window.onError.listen( |
| - (e) => handleExternalError(e, '(DOM callback has errors)')); |
| + (e) { |
| + // Some tests may expect this and have no way to suppress the error. |
| + if (js.context['testExpectsGlobalError'] != true) { |
|
vsm
2013/10/01 16:58:01
Perhaps it makes sense to clear this once it's bee
blois
2013/10/01 20:37:08
In a case such as innerHtml it'll be called multip
|
| + handleExternalError(e, '(DOM callback has errors)'); |
| + } |
| + }); |
| } |
| if (_onMessageSubscription == null) { |
| _onMessageSubscription = window.onMessage.listen( |