Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / storage / indexeddb / cursor-advance-expected.txt
blob6b77d8042dcc690885cc34d35a3e76ba15871687
1 Test IndexedDB cursor.advance().
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
6 dbname = "cursor-advance.html"
7 indexedDB.deleteDatabase(dbname)
8 indexedDB.open(dbname)
10 prepareDatabase():
11 objectStore = db.createObjectStore(objectStoreName);
12 Now create the indexes.
13 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].options);
14 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].options);
15 objectStore.createIndex(indexData[i].name, indexData[i].keyPath, indexData[i].options);
16 trans = db.transaction(objectStoreName, 'readwrite')
17 objectStore = trans.objectStore(objectStoreName)
18 First, add all our data to the object store.
19 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
20 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
21 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
22 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
23 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
24 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
25 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
26 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
27 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
28 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
29 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
30 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
31 request = objectStore.add(objectStoreData[i].value, objectStoreData[i].key);
32 testSimple()
33 trans = db.transaction(objectStoreName)
34 store = trans.objectStore(objectStoreName)
35 request = store.openCursor()
36 cursor.advance(1)
37 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
38 testContinueThenAdvance()
39 trans = db.transaction(objectStoreName)
40 store = trans.objectStore(objectStoreName)
41 request = store.openCursor()
42 cursor.continue();
43 cursor.continue();
44 cursor.continue();
45 cursor.advance(1)
46 PASS expected is "{\"key\":\"237-23-7736\",\"value\":{\"name\":\"Joe\",\"height\":65,\"weight\":150},\"primaryKey\":\"237-23-7736\"}"
47 testAdvanceMultiple()
48 trans = db.transaction(objectStoreName)
49 store = trans.objectStore(objectStoreName)
50 request = store.openCursor()
51 cursor.advance(3)
52 PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
53 testAdvanceIndex()
54 trans = db.transaction(objectStoreName)
55 store = trans.objectStore(objectStoreName)
56 request = store.openCursor()
57 cursor.advance(3)
58 PASS expected is "{\"key\":\"Jef\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}"
59 testAdvanceIndexNoDupe()
60 trans = db.transaction(objectStoreName)
61 store = trans.objectStore(objectStoreName)
62 request = store.openCursor(null, 'nextunique')
63 cursor.advance(3)
64 PASS expected is "{\"key\":130,\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
65 testAdvanceIndexPrev()
66 trans = db.transaction(objectStoreName)
67 store = trans.objectStore(objectStoreName)
68 request = store.openCursor(null, 'prev')
69 cursor.advance(3)
70 PASS expected is "{\"key\":150,\"value\":{\"name\":\"Joe\",\"height\":65,\"weight\":150},\"primaryKey\":\"237-23-7736\"}"
71 testAdvanceIndexPrevNoDupe()
72 trans = db.transaction(objectStoreName)
73 store = trans.objectStore(objectStoreName)
74 request = store.openCursor(null, 'prevunique')
75 cursor.advance(3)
76 PASS expected is "{\"key\":120,\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
77 testAdvanceToEnd()
78 trans = db.transaction(objectStoreName)
79 store = trans.objectStore(objectStoreName)
80 request = store.openCursor()
81 cursor.advance(100)
82 PASS expected is "null"
83 testPrefetchInRange()
84 trans = db.transaction(objectStoreName)
85 objectStore = trans.objectStore(objectStoreName)
86 request = objectStore.openCursor()
88 prefetch():
89 PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
90 cursor.continue()
92 prefetch():
93 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
94 cursor.continue()
96 prefetch():
97 PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}"
98 cursor.continue()
100 prefetch():
101 PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
102 cursor.advance(2)
104 prefetch():
105 PASS expected is "{\"key\":\"237-23-7737\",\"value\":{\"name\":\"Pat\",\"height\":65,\"weight\":100},\"primaryKey\":\"237-23-7737\"}"
106 cursor.continue()
108 prefetch():
109 PASS expected is "{\"key\":\"237-23-7738\",\"value\":{\"name\":\"Leo\",\"height\":65,\"weight\":180},\"primaryKey\":\"237-23-7738\"}"
110 cursor.continue()
112 prefetch():
113 PASS expected is "{\"key\":\"237-23-7739\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}"
114 cursor.continue()
116 prefetch():
117 PASS expected is "{\"key\":\"237-23-7740\",\"value\":{\"name\":\"Sam\",\"height\":71,\"weight\":110},\"primaryKey\":\"237-23-7740\"}"
118 cursor.continue()
120 prefetch():
121 PASS expected is "{\"key\":\"237-23-7741\",\"value\":{\"name\":\"Bug\",\"height\":63,\"weight\":100},\"primaryKey\":\"237-23-7741\"}"
122 cursor.continue()
124 prefetch():
125 PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}"
126 cursor.continue()
128 prefetch():
129 PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}"
130 cursor.continue()
132 prefetch():
133 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}"
134 cursor.continue()
136 prefetch():
137 testPrefetchOutOfRange()
138 trans = db.transaction(objectStoreName)
139 objectStore = trans.objectStore(objectStoreName)
140 request = objectStore.openCursor()
142 prefetch():
143 PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
144 cursor.continue()
146 prefetch():
147 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
148 cursor.continue()
150 prefetch():
151 PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}"
152 cursor.continue()
154 prefetch():
155 PASS expected is "{\"key\":\"237-23-7735\",\"value\":{\"name\":\"Sue\",\"height\":58,\"weight\":130},\"primaryKey\":\"237-23-7735\"}"
156 cursor.advance(7)
158 prefetch():
159 PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}"
160 cursor.continue()
162 prefetch():
163 PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}"
164 cursor.continue()
166 prefetch():
167 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}"
168 cursor.continue()
170 prefetch():
171 testBadAdvance()
172 trans = db.transaction(objectStoreName, 'readwrite')
173 objectStore = trans.objectStore(objectStoreName)
174 request = objectStore.openCursor()
176 advanceBadly():
177 Expecting TypeError exception from cursor.advance(0)
178 PASS Exception was thrown.
179 PASS cursor.advance(0) threw TypeError: Failed to execute 'advance' on 'IDBCursor': A count argument with value 0 (zero) was supplied, must be greater than 0.
180 Expecting TypeError exception from cursor.advance(-1)
181 PASS Exception was thrown.
182 PASS cursor.advance(-1) threw TypeError: Failed to execute 'advance' on 'IDBCursor': Value is outside the 'unsigned long' value range.
183 Expecting TypeError exception from cursor.advance(0x100000000)
184 PASS Exception was thrown.
185 PASS cursor.advance(0x100000000) threw TypeError: Failed to execute 'advance' on 'IDBCursor': Value is outside the 'unsigned long' value range.
186 Expecting TypeError exception from cursor.advance(0x20000000000000)
187 PASS Exception was thrown.
188 PASS cursor.advance(0x20000000000000) threw TypeError: Failed to execute 'advance' on 'IDBCursor': Value is outside the 'unsigned long' value range.
190 testEdges():
191 trans = db.transaction(objectStoreName, 'readonly')
192 objectStore = trans.objectStore(objectStoreName)
193 request = objectStore.openCursor()
195 onSuccess():
196 cursor = event.target.result
197 PASS cursor is non-null.
198 cursor.advance(0xffffffff)
200 onSuccess():
201 cursor = event.target.result
202 PASS cursor is null
203 testDelete()
204 trans = db.transaction(objectStoreName, 'readwrite')
205 objectStore = trans.objectStore(objectStoreName)
206 request = objectStore.openCursor()
208 deleteSecond():
209 PASS expected is "{\"key\":\"237-23-7732\",\"value\":{\"name\":\"Bob\",\"height\":60,\"weight\":120},\"primaryKey\":\"237-23-7732\"}"
210 cursor.advance(1)
212 deleteSecond():
213 PASS expected is "{\"key\":\"237-23-7733\",\"value\":{\"name\":\"Ann\",\"height\":52,\"weight\":110},\"primaryKey\":\"237-23-7733\"}"
214 cursor.advance(1)
216 deleteSecond():
217 PASS expected is "{\"key\":\"237-23-7734\",\"value\":{\"name\":\"Ron\",\"height\":73,\"weight\":180},\"primaryKey\":\"237-23-7734\"}"
218 cursor.delete()
220 deleteSecond():
221 PASS expected is "{\"key\":\"237-23-7738\",\"value\":{\"name\":\"Leo\",\"height\":65,\"weight\":180},\"primaryKey\":\"237-23-7738\"}"
222 cursor.advance(1)
224 deleteSecond():
225 PASS expected is "{\"key\":\"237-23-7739\",\"value\":{\"name\":\"Jef\",\"height\":65,\"weight\":120},\"primaryKey\":\"237-23-7739\"}"
226 cursor.advance(1)
228 deleteSecond():
229 PASS expected is "{\"key\":\"237-23-7740\",\"value\":{\"name\":\"Sam\",\"height\":71,\"weight\":110},\"primaryKey\":\"237-23-7740\"}"
230 cursor.advance(1)
232 deleteSecond():
233 PASS expected is "{\"key\":\"237-23-7741\",\"value\":{\"name\":\"Bug\",\"height\":63,\"weight\":100},\"primaryKey\":\"237-23-7741\"}"
234 cursor.advance(1)
236 deleteSecond():
237 PASS expected is "{\"key\":\"237-23-7742\",\"value\":{\"name\":\"Tub\",\"height\":69,\"weight\":180},\"primaryKey\":\"237-23-7742\"}"
238 cursor.advance(1)
240 deleteSecond():
241 PASS expected is "{\"key\":\"237-23-7743\",\"value\":{\"name\":\"Rug\",\"height\":77,\"weight\":120},\"primaryKey\":\"237-23-7743\"}"
242 cursor.advance(1)
244 deleteSecond():
245 PASS expected is "{\"key\":\"237-23-7744\",\"value\":{\"name\":\"Pug\",\"height\":66,\"weight\":110},\"primaryKey\":\"237-23-7744\"}"
246 cursor.advance(1)
248 deleteSecond():
249 PASS successfullyParsed is true
251 TEST COMPLETE