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

Unified Diff: tests/html/exceptions_test.dart

Issue 10891020: Update almost all tests (except co19) to use the new try-catch syntax. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge. Created 8 years, 4 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 | « tests/html/documentfragment_test.dart ('k') | tests/html/hidden_dom_1_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/exceptions_test.dart
diff --git a/tests/html/exceptions_test.dart b/tests/html/exceptions_test.dart
index 8e7250f04550b265dead326a6c1430dfb0d1ee3d..984a3d0e00b5c3896ba318821904320f5c39f5b3 100644
--- a/tests/html/exceptions_test.dart
+++ b/tests/html/exceptions_test.dart
@@ -8,7 +8,7 @@ main() {
test('DOMException', () {
try {
window.webkitNotifications.createNotification('', '', '');
- } catch (DOMException e) {
+ } on DOMException catch (e) {
Expect.equals(DOMException.SECURITY_ERR, e.code);
Expect.equals('SECURITY_ERR', e.name);
Expect.equals('SECURITY_ERR: DOM Exception 18', e.message);
@@ -19,7 +19,7 @@ main() {
// Intentionally do not initialize it!
try {
document.$dom_dispatchEvent(event);
- } catch (EventException e) {
+ } on EventException catch (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 | « tests/html/documentfragment_test.dart ('k') | tests/html/hidden_dom_1_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698