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

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

Issue 10540016: indexedDB work (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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
OLDNEW
1 #library('IndexedDB4Test'); 1 #library('IndexedDB4Test');
2 #import('../../lib/unittest/unittest.dart'); 2 #import('../../lib/unittest/unittest.dart');
3 #import('../../lib/unittest/html_config.dart'); 3 #import('../../lib/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 final String DB_NAME = 'Test'; 8 final String DB_NAME = 'Test';
9 final String STORE_NAME = 'TEST'; 9 final String STORE_NAME = 'TEST';
10 final String VERSION = '1'; 10 final String VERSION = '1';
11 11
12 class Test { 12 class Test {
13 var db; 13 var db;
14 14
15 start() { 15 start() {
16 var request = window.webkitIndexedDB.open(DB_NAME); 16 var request = window.indexedDB.open(DB_NAME);
17 Expect.isNotNull(request); 17 Expect.isNotNull(request);
18 request.on.success.add(expectAsync1(initDb)); 18 request.on.success.add(expectAsync1(initDb));
19 request.on.error.add(fail('open')); 19 request.on.error.add(fail('open'));
20 } 20 }
21 21
22 initDb(e) { 22 initDb(e) {
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?
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 test('upper1', test_.upper1); 136 test('upper1', test_.upper1);
137 test('upper2', test_.upper2); 137 test('upper2', test_.upper2);
138 test('upper3', test_.upper3); 138 test('upper3', test_.upper3);
139 139
140 test('bound1', test_.bound1); 140 test('bound1', test_.bound1);
141 test('bound2', test_.bound2); 141 test('bound2', test_.bound2);
142 test('bound3', test_.bound3); 142 test('bound3', test_.bound3);
143 test('bound4', test_.bound4); 143 test('bound4', test_.bound4);
144 test('bound5', test_.bound5); 144 test('bound5', test_.bound5);
145 } 145 }
OLDNEW
« lib/dom/templates/html/frog/impl_IDBDatabase.darttemplate ('K') | « tests/html/indexeddb_3_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698