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

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

Issue 23480034: Test changes accompanying Dartium indexed DB fixes (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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/html.status ('k') | no next file » | 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/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:async'; 4 import 'dart:async';
5 import 'dart:html' as html; 5 import 'dart:html' as html;
6 import 'dart:indexed_db'; 6 import 'dart:indexed_db';
7 7
8 // Test for KeyRange and Cursor. 8 // Test for KeyRange and Cursor.
9 9
10 const String DB_NAME = 'Test4'; 10 const String DB_NAME = 'Test4';
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 }); 74 });
75 } 75 }
76 76
77 main() { 77 main() {
78 useHtmlConfiguration(); 78 useHtmlConfiguration();
79 79
80 // Don't bother with these tests if it's unsupported. 80 // Don't bother with these tests if it's unsupported.
81 // Support is tested in indexeddb_1_test 81 // Support is tested in indexeddb_1_test
82 if (IdbFactory.supported) { 82 if (IdbFactory.supported) {
83 var db; 83 var db;
84 test('prepare', () { 84 setUp(() {
85 return setupDb().then((result) { 85 if (db == null) {
86 db = result; 86 return setupDb().then((result) {
87 }); 87 db = result;
88 });
89 }
88 }); 90 });
89
90 test('only1', () => testRange(db, new KeyRange.only(55), 55, 55));
91
92 test('only1', () => testRange(db, new KeyRange.only(55), 55, 55)); 91 test('only1', () => testRange(db, new KeyRange.only(55), 55, 55));
93 test('only2', () => testRange(db, new KeyRange.only(100), null, null)); 92 test('only2', () => testRange(db, new KeyRange.only(100), null, null));
94 test('only3', () => testRange(db, new KeyRange.only(-1), null, null)); 93 test('only3', () => testRange(db, new KeyRange.only(-1), null, null));
95 94
96 test('lower1', () => 95 test('lower1', () =>
97 testRange(db, new KeyRange.lowerBound(40), 40, 99)); 96 testRange(db, new KeyRange.lowerBound(40), 40, 99));
98 // OPTIONALS lower2() => testRange(db, new KeyRange.lowerBound(40, open: tru e), 41, 99); 97 // OPTIONALS lower2() => testRange(db, new KeyRange.lowerBound(40, open: tru e), 41, 99);
99 test('lower2', () => 98 test('lower2', () =>
100 testRange(db, new KeyRange.lowerBound(40, true), 41, 99)); 99 testRange(db, new KeyRange.lowerBound(40, true), 41, 99));
101 // OPTIONALS lower3() => testRange(db, new KeyRange.lowerBound(40, open: fal se), 40, 99); 100 // OPTIONALS lower3() => testRange(db, new KeyRange.lowerBound(40, open: fal se), 40, 99);
(...skipping 21 matching lines...) Expand all
123 122
124 bound4() => 123 bound4() =>
125 // OPTIONALS testRange(db, new KeyRange.bound(20, 30, lowerOpen: true), 124 // OPTIONALS testRange(db, new KeyRange.bound(20, 30, lowerOpen: true),
126 testRange(db, new KeyRange.bound(20, 30, true), 21, 30); 125 testRange(db, new KeyRange.bound(20, 30, true), 21, 30);
127 126
128 bound5() => 127 bound5() =>
129 // OPTIONALS testRange(db, new KeyRange.bound(20, 30, lowerOpen: true, u pperOpen: true), 128 // OPTIONALS testRange(db, new KeyRange.bound(20, 30, lowerOpen: true, u pperOpen: true),
130 testRange(db, new KeyRange.bound(20, 30, true, true), 21, 29); 129 testRange(db, new KeyRange.bound(20, 30, true, true), 21, 29);
131 } 130 }
132 } 131 }
OLDNEW
« no previous file with comments | « tests/html/html.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698