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

Side by Side Diff: tests/html/indexeddb_4_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, 3 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/html/indexeddb_3_test.dart ('k') | tests/html/inner_frame_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('IndexedDB4Test'); 1 #library('IndexedDB4Test');
2 #import('../../pkg/unittest/unittest.dart'); 2 #import('../../pkg/unittest/unittest.dart');
3 #import('../../pkg/unittest/html_config.dart'); 3 #import('../../pkg/unittest/html_config.dart');
4 #import('dart:html'); 4 #import('dart:html');
5 5
6 // Test for IDBKeyRange and IDBCursor. 6 // Test for IDBKeyRange and IDBCursor.
7 7
8 const String DB_NAME = 'Test'; 8 const String DB_NAME = 'Test';
9 const String STORE_NAME = 'TEST'; 9 const String STORE_NAME = 'TEST';
10 const String VERSION = '1'; 10 const String VERSION = '1';
(...skipping 12 matching lines...) Expand all
23 db = e.target.result; 23 db = e.target.result;
24 // TODO. Some browsers do this the w3 way - passing the VERSION to the 24 // TODO. Some browsers do this the w3 way - passing the VERSION to the
25 // open call and listening to onversionchange. Can we feature-detect the 25 // open call and listening to onversionchange. Can we feature-detect the
26 // difference and make it work? 26 // difference and make it work?
27 var request = db.setVersion(VERSION); 27 var request = db.setVersion(VERSION);
28 request.on.success.add( 28 request.on.success.add(
29 expectAsync1((e) { 29 expectAsync1((e) {
30 try { 30 try {
31 // Nuke object store if it already exists. 31 // Nuke object store if it already exists.
32 db.deleteObjectStore(STORE_NAME); 32 db.deleteObjectStore(STORE_NAME);
33 } catch (IDBDatabaseException e) { } 33 } on IDBDatabaseException catch (e) { }
34 db.createObjectStore(STORE_NAME); 34 db.createObjectStore(STORE_NAME);
35 35
36 var transaction = e.target.result; 36 var transaction = e.target.result;
37 transaction.on.complete.add(expectAsync1((e) => writeItems(0))); 37 transaction.on.complete.add(expectAsync1((e) => writeItems(0)));
38 transaction.on.error.add(fail); 38 transaction.on.error.add(fail);
39 }) 39 })
40 ); 40 );
41 request.on.error.add(fail('setVersion error')); 41 request.on.error.add(fail('setVersion error'));
42 } 42 }
43 43
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 test('upper1', test_.upper1); 139 test('upper1', test_.upper1);
140 test('upper2', test_.upper2); 140 test('upper2', test_.upper2);
141 test('upper3', test_.upper3); 141 test('upper3', test_.upper3);
142 142
143 test('bound1', test_.bound1); 143 test('bound1', test_.bound1);
144 test('bound2', test_.bound2); 144 test('bound2', test_.bound2);
145 test('bound3', test_.bound3); 145 test('bound3', test_.bound3);
146 test('bound4', test_.bound4); 146 test('bound4', test_.bound4);
147 test('bound5', test_.bound5); 147 test('bound5', test_.bound5);
148 } 148 }
OLDNEW
« no previous file with comments | « tests/html/indexeddb_3_test.dart ('k') | tests/html/inner_frame_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698