Index: test/codegen/lib/html/exceptions_test.dart |
diff --git a/test/codegen/lib/html/exceptions_test.dart b/test/codegen/lib/html/exceptions_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d7603b90f90179daad62240ab3547f1aa224580a |
--- /dev/null |
+++ b/test/codegen/lib/html/exceptions_test.dart |
@@ -0,0 +1,18 @@ |
+library ExceptionsTest; |
+import 'package:unittest/unittest.dart'; |
+import 'package:unittest/html_config.dart'; |
+import 'dart:html'; |
+ |
+main() { |
+ useHtmlConfiguration(); |
+ |
+ test('EventException', () { |
+ final event = new Event('Event'); |
+ // Intentionally do not initialize it! |
+ try { |
+ document.dispatchEvent(event); |
+ } on DomException catch (e) { |
+ expect(e.name, DomException.INVALID_STATE); |
+ } |
+ }); |
+} |