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

Side by Side Diff: tests/html/exceptions_test.dart

Issue 11800002: "Reverting 16675-16676, 71-73" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/co19/test_config.dart ('k') | tests/html/form_data_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 library ExceptionsTest; 1 library ExceptionsTest;
2 import '../../pkg/unittest/lib/unittest.dart'; 2 import '../../pkg/unittest/lib/unittest.dart';
3 import '../../pkg/unittest/lib/html_config.dart'; 3 import '../../pkg/unittest/lib/html_config.dart';
4 import 'dart:html'; 4 import 'dart:html';
5 5
6 main() { 6 main() {
7 useHtmlConfiguration(); 7 useHtmlConfiguration();
8 test('DomException', () { 8 test('DomException', () {
9 try { 9 try {
10 window.webkitNotifications.createNotification('', '', ''); 10 window.webkitNotifications.createNotification('', '', '');
11 } on DomException catch (e) { 11 } on DomException catch (e) {
12 expect(e.code, DomException.SECURITY_ERR); 12 expect(e.code, DomException.SECURITY_ERR);
13 expect(e.name, 'SecurityError'); 13 expect(e.name, 'SECURITY_ERR');
14 expect(e.message, 'SecurityError: DOM Exception 18'); 14 expect(e.message, 'SECURITY_ERR: DOM Exception 18');
15 } 15 }
16 }); 16 });
17 test('EventException', () { 17 test('EventException', () {
18 final event = new Event('Event'); 18 final event = new Event('Event');
19 // Intentionally do not initialize it! 19 // Intentionally do not initialize it!
20 try { 20 try {
21 document.$dom_dispatchEvent(event); 21 document.$dom_dispatchEvent(event);
22 } on EventException catch (e) { 22 } on EventException catch (e) {
23 expect(e.code, EventException.UNSPECIFIED_EVENT_TYPE_ERR); 23 expect(e.code, EventException.UNSPECIFIED_EVENT_TYPE_ERR);
24 expect(e.name, 'UNSPECIFIED_EVENT_TYPE_ERR'); 24 expect(e.name, 'UNSPECIFIED_EVENT_TYPE_ERR');
25 expect(e.message, 'UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0'); 25 expect(e.message, 'UNSPECIFIED_EVENT_TYPE_ERR: DOM Events Exception 0');
26 } 26 }
27 }); 27 });
28 } 28 }
OLDNEW
« no previous file with comments | « tests/co19/test_config.dart ('k') | tests/html/form_data_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698