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

Unified Diff: client/tests/client/dom/ExceptionsTest.dart

Issue 9314008: Migrate all LayoutTests/dart/dom to main repo. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Update config file Created 8 years, 11 months 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 | « client/tests/client/dom/EventsTest.dart ('k') | client/tests/client/dom/HTMLCollectionTest.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/tests/client/dom/ExceptionsTest.dart
diff --git a/client/tests/client/dom/ExceptionsTest.dart b/client/tests/client/dom/ExceptionsTest.dart
new file mode 100644
index 0000000000000000000000000000000000000000..508e9fe5a4b07c8713f6e897f40dca02c4ea7f01
--- /dev/null
+++ b/client/tests/client/dom/ExceptionsTest.dart
@@ -0,0 +1,27 @@
+#library('ExceptionsTest');
+#import('../../../testing/unittest/unittest.dart');
+#import('dart:dom');
+
+main() {
+ forLayoutTests();
+ test('DOMException', () {
+ try {
+ window.webkitNotifications.createNotification('', '', '');
+ } catch (DOMException e) {
+ Expect.equals(DOMException.SECURITY_ERR, e.code);
+ Expect.equals('SECURITY_ERR', e.name);
+ Expect.equals('SECURITY_ERR: DOM Exception 18', e.message);
+ }
+ });
+ test('EventException', () {
+ final event = window.document.createEvent('Event');
+ // Intentionally do not initialize it!
+ try {
+ window.document.dispatchEvent(event);
+ } catch (EventException e) {
+ Expect.equals(EventException.UNSPECIFIED_EVENT_TYPE_ERR, e.code);
+ Expect.equals('UNSPECIFIED_EVENT_TYPE_ERR', e.name);
+ Expect.equals('UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0', e.message);
+ }
+ });
+}
« no previous file with comments | « client/tests/client/dom/EventsTest.dart ('k') | client/tests/client/dom/HTMLCollectionTest.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698