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

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

Issue 11184007: Support new named arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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('../../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 int VERSION = 1; 10 const int VERSION = 1;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 count: 1 + ((expectedFirst == null) ? 115 count: 1 + ((expectedFirst == null) ?
116 0 : (expectedLast - expectedFirst + 1)))); 116 0 : (expectedLast - expectedFirst + 1))));
117 cursorRequest.on.error.add(fail('openCursor')); 117 cursorRequest.on.error.add(fail('openCursor'));
118 } 118 }
119 119
120 only1() => testRange(new IDBKeyRange.only(55), 55, 55); 120 only1() => testRange(new IDBKeyRange.only(55), 55, 55);
121 only2() => testRange(new IDBKeyRange.only(100), null, null); 121 only2() => testRange(new IDBKeyRange.only(100), null, null);
122 only3() => testRange(new IDBKeyRange.only(-1), null, null); 122 only3() => testRange(new IDBKeyRange.only(-1), null, null);
123 123
124 lower1() => testRange(new IDBKeyRange.lowerBound(40), 40, 99); 124 lower1() => testRange(new IDBKeyRange.lowerBound(40), 40, 99);
125 lower2() => testRange(new IDBKeyRange.lowerBound(40, open: true), 41, 99); 125 // OPTIONALS lower2() => testRange(new IDBKeyRange.lowerBound(40, open: true), 41, 99);
126 lower3() => testRange(new IDBKeyRange.lowerBound(40, open: false), 40, 99); 126 lower2() => testRange(new IDBKeyRange.lowerBound(40, true), 41, 99);
127 // OPTIONALS lower3() => testRange(new IDBKeyRange.lowerBound(40, open: false) , 40, 99);
128 lower3() => testRange(new IDBKeyRange.lowerBound(40, false), 40, 99);
127 129
128 upper1() => testRange(new IDBKeyRange.upperBound(40), 0, 40); 130 upper1() => testRange(new IDBKeyRange.upperBound(40), 0, 40);
129 upper2() => testRange(new IDBKeyRange.upperBound(40, open: true), 0, 39); 131 // OPTIONALS upper2() => testRange(new IDBKeyRange.upperBound(40, open: true), 0, 39);
130 upper3() => testRange(new IDBKeyRange.upperBound(40, open: false), 0, 40); 132 upper2() => testRange(new IDBKeyRange.upperBound(40, true), 0, 39);
133 // upper3() => testRange(new IDBKeyRange.upperBound(40, open: false), 0, 40);
134 upper3() => testRange(new IDBKeyRange.upperBound(40, false), 0, 40);
131 135
132 bound1() => testRange(new IDBKeyRange.bound(20, 30), 20, 30); 136 bound1() => testRange(new IDBKeyRange.bound(20, 30), 20, 30);
133 137
134 bound2() => testRange(new IDBKeyRange.bound(-100, 200), 0, 99); 138 bound2() => testRange(new IDBKeyRange.bound(-100, 200), 0, 99);
135 139
136 bound3() => 140 bound3() =>
137 testRange(new IDBKeyRange.bound(20, 30, upperOpen: true), 141 // OPTIONALS testRange(new IDBKeyRange.bound(20, 30, upperOpen: true),
142 testRange(new IDBKeyRange.bound(20, 30, false, true),
138 20, 29); 143 20, 29);
139 144
140 bound4() => 145 bound4() =>
141 testRange(new IDBKeyRange.bound(20, 30, lowerOpen: true), 146 // OPTIONALS testRange(new IDBKeyRange.bound(20, 30, lowerOpen: true),
147 testRange(new IDBKeyRange.bound(20, 30, true),
142 21, 30); 148 21, 30);
143 149
144 bound5() => 150 bound5() =>
145 testRange(new IDBKeyRange.bound(20, 30, lowerOpen: true, upperOpen: true), 151 // OPTIONALS testRange(new IDBKeyRange.bound(20, 30, lowerOpen: true, uppe rOpen: true),
152 testRange(new IDBKeyRange.bound(20, 30, true, true),
146 21, 29); 153 21, 29);
147 154
148 } 155 }
149 156
150 main() { 157 main() {
151 useHtmlConfiguration(); 158 useHtmlConfiguration();
152 159
153 var test_ = new Test(); 160 var test_ = new Test();
154 test('prepare', test_.setupDb); 161 test('prepare', test_.setupDb);
155 162
156 test('only1', test_.only1); 163 test('only1', test_.only1);
157 test('only2', test_.only2); 164 test('only2', test_.only2);
158 test('only3', test_.only3); 165 test('only3', test_.only3);
159 166
160 test('lower1', test_.lower1); 167 test('lower1', test_.lower1);
161 test('lower2', test_.lower2); 168 test('lower2', test_.lower2);
162 test('lower3', test_.lower3); 169 test('lower3', test_.lower3);
163 170
164 test('upper1', test_.upper1); 171 test('upper1', test_.upper1);
165 test('upper2', test_.upper2); 172 test('upper2', test_.upper2);
166 test('upper3', test_.upper3); 173 test('upper3', test_.upper3);
167 174
168 test('bound1', test_.bound1); 175 test('bound1', test_.bound1);
169 test('bound2', test_.bound2); 176 test('bound2', test_.bound2);
170 test('bound3', test_.bound3); 177 test('bound3', test_.bound3);
171 test('bound4', test_.bound4); 178 test('bound4', test_.bound4);
172 test('bound5', test_.bound5); 179 test('bound5', test_.bound5);
173 } 180 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698