Changeset 192800 in webkit
- Timestamp:
- Nov 30, 2015 10:21:16 AM (8 years ago)
- Location:
- trunk
- Files:
-
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r192799 r192800 1 2015-11-30 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: openCursor() fix resulting in at least 4 more passing tests. 4 https://bugs.webkit.org/show_bug.cgi?id=151630 5 6 Reviewed by Andy Estes. 7 8 * platform/mac-wk1/TestExpectations: 9 * storage/indexeddb/modern/cursor-2-expected.txt: 10 * storage/indexeddb/modern/cursor-2.html: 11 * storage/indexeddb/modern/cursor-3-expected.txt: 12 * storage/indexeddb/modern/cursor-3.html: 13 * storage/indexeddb/modern/cursor-4-expected.txt: 14 * storage/indexeddb/modern/cursor-4.html: 15 * storage/indexeddb/modern/deleteindex-1-expected.txt: 16 * storage/indexeddb/modern/deleteindex-1.html: 17 * storage/indexeddb/modern/deleteindex-2-expected.txt: 18 * storage/indexeddb/modern/deleteindex-2.html: 19 * storage/indexeddb/modern/index-4-expected.txt: 20 * storage/indexeddb/modern/index-4.html: 21 * storage/indexeddb/modern/index-cursor-1-expected.txt: 22 * storage/indexeddb/modern/index-cursor-1.html: 23 * storage/indexeddb/modern/index-cursor-2-expected.txt: 24 * storage/indexeddb/modern/index-cursor-2.html: 25 * storage/indexeddb/modern/index-cursor-3-expected.txt: 26 * storage/indexeddb/modern/index-cursor-3.html: 27 1 28 2015-11-30 Ryan Haddad <ryanhaddad@apple.com> 2 29 -
trunk/LayoutTests/platform/mac-wk1/TestExpectations
r192798 r192800 76 76 storage/indexeddb/mozilla/autoincrement-indexes.html [ Pass ] 77 77 storage/indexeddb/mozilla/bad-keypath.html [ Pass ] 78 storage/indexeddb/mozilla/clear.html [ Pass ] 78 79 storage/indexeddb/mozilla/create-index-unique.html [ Pass ] 79 80 storage/indexeddb/mozilla/create-index-with-integer-keys.html [ Pass ] 80 81 storage/indexeddb/mozilla/create-objectstore-basics.html [ Pass ] 81 82 storage/indexeddb/mozilla/create-objectstore-null-name.html [ Pass ] 83 storage/indexeddb/mozilla/cursor-mutation-objectstore-only.html [ Pass ] 84 storage/indexeddb/mozilla/cursor-mutation.html [ Pass ] 82 85 storage/indexeddb/mozilla/delete-result.html [ Pass ] 83 86 storage/indexeddb/mozilla/event-source.html [ Pass ] … … 99 102 storage/indexeddb/mozilla/readyState.html [ Pass ] 100 103 storage/indexeddb/mozilla/remove-index.html [ Pass ] 104 storage/indexeddb/mozilla/remove-objectstore.html [ Pass ] 101 105 storage/indexeddb/mozilla/versionchange-abort.html [ Pass ] 102 106 -
trunk/LayoutTests/storage/indexeddb/modern/cursor-2-expected.txt
r192490 r192800 78 78 Cursor value is: [object Object] 79 79 Cursor primary key is: foo 80 Success iterating next cursor81 Cursor is: [object IDBCursorWithValue]82 Cursor direction is: next83 Cursor source is: [object IDBObjectStore] (TestObjectStore)84 Cursor key is: undefined85 Cursor value is: undefined86 Cursor primary key is: undefined87 80 Success iterating prev cursor 88 81 Cursor is: [object IDBCursorWithValue] … … 162 155 Cursor value is: Record 0 163 156 Cursor primary key is: 0 164 Success iterating prev cursor165 Cursor is: [object IDBCursorWithValue]166 Cursor direction is: prev167 Cursor source is: [object IDBObjectStore] (TestObjectStore)168 Cursor key is: undefined169 Cursor value is: undefined170 Cursor primary key is: undefined171 157 Initial upgrade versionchange transaction complete 172 158 Done -
trunk/LayoutTests/storage/indexeddb/modern/cursor-2.html
r192490 r192800 33 33 34 34 var objectStore; 35 35 var shouldStartPrevious = true; 36 36 function setupRequest(request) 37 37 { 38 38 request.onsuccess = function() { 39 if (!request.result) { 40 if (shouldStartPrevious) { 41 setupRequest(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev")); 42 shouldStartPrevious = false; 43 } 44 return; 45 } 46 39 47 log("Success iterating " + request.result.direction + " cursor"); 40 48 logCursor(request.result); 41 if (request.result.key != undefined) 42 request.result.continue(); 43 else if (request.result.direction == "next") 44 setupRequest(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev")); 45 // else 46 // log("OKAY how?"); 49 request.result.continue(); 47 50 } 51 48 52 request.onerror = function(e) { 49 53 log("Error iterating cursor"); -
trunk/LayoutTests/storage/indexeddb/modern/cursor-3-expected.txt
r192490 r192800 47 47 Cursor direction is: next 48 48 Cursor source is: [object IDBObjectStore] (TestObjectStore) 49 Cursor key is: undefined50 Cursor value is: undefined51 Cursor primary key is: undefined52 Success iterating cursor53 Cursor is: [object IDBCursorWithValue]54 Cursor direction is: next55 Cursor source is: [object IDBObjectStore] (TestObjectStore)56 49 Cursor key is: 0 57 50 Cursor value is: Record 0 … … 78 71 Cursor value is: Record 9 79 72 Cursor primary key is: 9 80 Success iterating cursor81 Cursor is: [object IDBCursorWithValue]82 Cursor direction is: next83 Cursor source is: [object IDBObjectStore] (TestObjectStore)84 Cursor key is: undefined85 Cursor value is: undefined86 Cursor primary key is: undefined87 73 Initial upgrade versionchange transaction complete 88 74 Done -
trunk/LayoutTests/storage/indexeddb/modern/cursor-3.html
r192490 r192800 37 37 { 38 38 request.onsuccess = function() { 39 if (!request.result) { 40 setupRequest2(objectStore.openCursor()); 41 return; 42 } 39 43 log("Success iterating cursor"); 40 44 logCursor(request.result); 41 if (request.result.key != undefined) 42 request.result.continue(request.result.key + 2); 43 else 44 setupRequest2(objectStore.openCursor()); 45 request.result.continue(request.result.key + 2); 45 46 } 46 47 request.onerror = function(e) { … … 53 54 { 54 55 request.onsuccess = function() { 56 if (!request.result) 57 return; 55 58 log("Success iterating cursor"); 56 59 logCursor(request.result); 57 if (request.result.key != undefined) 58 request.result.advance(3); 60 request.result.advance(3); 59 61 } 60 62 request.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/cursor-4-expected.txt
r192490 r192800 40 40 Cursor direction is: prev 41 41 Cursor source is: [object IDBObjectStore] (TestObjectStore) 42 Cursor key is: undefined43 Cursor value is: undefined44 Cursor primary key is: undefined45 Success iterating cursor46 Cursor is: [object IDBCursorWithValue]47 Cursor direction is: prev48 Cursor source is: [object IDBObjectStore] (TestObjectStore)49 42 Cursor key is: 9 50 43 Cursor value is: Record 9 … … 71 64 Cursor value is: Record 0 72 65 Cursor primary key is: 0 73 Success iterating cursor74 Cursor is: [object IDBCursorWithValue]75 Cursor direction is: prev76 Cursor source is: [object IDBObjectStore] (TestObjectStore)77 Cursor key is: undefined78 Cursor value is: undefined79 Cursor primary key is: undefined80 66 Initial upgrade versionchange transaction complete 81 67 Done -
trunk/LayoutTests/storage/indexeddb/modern/cursor-4.html
r192490 r192800 37 37 { 38 38 request.onsuccess = function() { 39 if (!request.result) { 40 setupRequest2(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev")); 41 return; 42 } 39 43 log("Success iterating cursor"); 40 44 logCursor(request.result); 41 if (request.result.key != undefined) 42 request.result.continue(request.result.key - 2); 43 else 44 setupRequest2(objectStore.openCursor(IDBKeyRange.lowerBound(-Infinity), "prev")); 45 request.result.continue(request.result.key - 2); 45 46 } 46 47 request.onerror = function(e) { … … 53 54 { 54 55 request.onsuccess = function() { 56 if (!request.result) 57 return; 55 58 log("Success iterating cursor"); 56 59 logCursor(request.result); 57 if (request.result.key != undefined) 58 request.result.advance(3); 60 request.result.advance(3); 59 61 } 60 62 request.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1-expected.txt
r192645 r192800 4 4 Cursor at record: A / 1 5 5 Cursor at record: A / 2 6 Cursor at record: undefined / undefined7 6 Deleted the index 8 7 Initial upgrade versionchange transaction complete -
trunk/LayoutTests/storage/indexeddb/modern/deleteindex-1.html
r192645 r192800 34 34 cursorRequest.onsuccess = function() { 35 35 var cursor = cursorRequest.result; 36 log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey); 37 38 if (cursor.key != undefined) 39 cursor.continue(); 40 else { 36 if (!cursor) { 41 37 objectStore.deleteIndex("TestIndex1"); 42 38 log("Deleted the index"); 39 return; 43 40 } 41 42 log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey); 43 cursor.continue(); 44 44 } 45 45 cursorRequest.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2-expected.txt
r192645 r192800 4 4 Cursor at record: A / 1 5 5 Cursor at record: A / 2 6 Cursor at record: undefined / undefined7 6 Initial upgrade versionchange transaction complete 8 7 Second upgrade needed: Old version - 1 New version - 2 … … 14 13 Cursor at record: A / 1 15 14 Cursor at record: A / 2 16 Cursor at record: undefined / undefined17 15 Third upgrade versionchange transaction complete 18 16 Done -
trunk/LayoutTests/storage/indexeddb/modern/deleteindex-2.html
r192645 r192800 34 34 cursorRequest.onsuccess = function() { 35 35 var cursor = cursorRequest.result; 36 if (!cursor) 37 return; 38 36 39 log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey); 37 38 if (cursor.key != undefined) 39 cursor.continue(); 40 cursor.continue(); 40 41 } 41 42 cursorRequest.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/index-4-expected.txt
r192618 r192800 20 20 Cursor at record: I / 17 21 21 Cursor at record: I / 18 22 Cursor at record: undefined / undefined23 22 Done 24 23 -
trunk/LayoutTests/storage/indexeddb/modern/index-4.html
r192618 r192800 33 33 cursorRequest.onsuccess = function() { 34 34 var cursor = cursorRequest.result; 35 if (!cursor) { 36 done(); 37 return; 38 } 35 39 log("Cursor at record: " + cursor.key + " / " + cursor.primaryKey); 36 37 if (cursor.key != undefined) 38 cursor.continue(); 39 else 40 done(); 40 cursor.continue(); 41 41 42 } 42 43 cursorRequest.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1-expected.txt
r192610 r192800 77 77 Cursor primary key is: 12 78 78 Cursor value is: [object Object] 79 Success opening or iterating cursor80 Cursor direction is: next81 Cursor source is: TestIndex182 Cursor key is: undefined83 Cursor primary key is: undefined84 Cursor value is: undefined85 79 86 80 Starting a new cursor: testCursorDirection(index2, 'next') … … 157 151 Cursor primary key is: 12 158 152 Cursor value is: [object Object] 159 Success opening or iterating cursor160 Cursor direction is: next161 Cursor source is: TestIndex2162 Cursor key is: undefined163 Cursor primary key is: undefined164 Cursor value is: undefined165 153 166 154 Starting a new cursor: testCursorDirection(index1, 'nextunique') … … 189 177 Cursor primary key is: 10 190 178 Cursor value is: [object Object] 191 Success opening or iterating cursor192 Cursor direction is: nextunique193 Cursor source is: TestIndex1194 Cursor key is: undefined195 Cursor primary key is: undefined196 Cursor value is: undefined197 179 198 180 Starting a new cursor: testCursorDirection(index2, 'nextunique') … … 221 203 Cursor primary key is: 10 222 204 Cursor value is: [object Object] 223 Success opening or iterating cursor224 Cursor direction is: nextunique225 Cursor source is: TestIndex2226 Cursor key is: undefined227 Cursor primary key is: undefined228 Cursor value is: undefined229 205 230 206 Starting a new cursor: testCursorDirection(index1, 'prev') … … 301 277 Cursor primary key is: 1 302 278 Cursor value is: [object Object] 303 Success opening or iterating cursor304 Cursor direction is: prev305 Cursor source is: TestIndex1306 Cursor key is: undefined307 Cursor primary key is: undefined308 Cursor value is: undefined309 279 310 280 Starting a new cursor: testCursorDirection(index2, 'prev') … … 381 351 Cursor primary key is: 1 382 352 Cursor value is: [object Object] 383 Success opening or iterating cursor384 Cursor direction is: prev385 Cursor source is: TestIndex2386 Cursor key is: undefined387 Cursor primary key is: undefined388 Cursor value is: undefined389 353 390 354 Starting a new cursor: testCursorDirection(index1, 'prevunique') … … 413 377 Cursor primary key is: 3 414 378 Cursor value is: [object Object] 415 Success opening or iterating cursor416 Cursor direction is: prevunique417 Cursor source is: TestIndex1418 Cursor key is: undefined419 Cursor primary key is: undefined420 Cursor value is: undefined421 379 422 380 Starting a new cursor: testCursorDirection(index2, 'prevunique') … … 445 403 Cursor primary key is: 3 446 404 Cursor value is: [object Object] 447 Success opening or iterating cursor448 Cursor direction is: prevunique449 Cursor source is: TestIndex2450 Cursor key is: undefined451 Cursor primary key is: undefined452 Cursor value is: undefined453 405 Done 454 406 -
trunk/LayoutTests/storage/indexeddb/modern/index-cursor-1.html
r192610 r192800 32 32 { 33 33 request.onsuccess = function() { 34 if (!request.result) { 35 startNextCursor(); 36 return; 37 } 34 38 log("Success opening or iterating cursor"); 35 39 logCursor(request.result); 36 if (request.result.key != undefined) 37 request.result.continue(); 38 else 39 startNextCursor(); 40 request.result.continue(); 40 41 } 41 42 request.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2-expected.txt
r192610 r192800 22 22 Cursor primary key is: 9 23 23 Cursor value is: [object Object] 24 Success opening or iterating cursor25 Cursor direction is: next26 Cursor source is: TestIndex127 Cursor key is: undefined28 Cursor primary key is: undefined29 Cursor value is: undefined30 24 31 25 Starting a new cursor: testCursorDirection('nextunique', IDBKeyRange.bound('B', 'D', true, true)) … … 36 30 Cursor primary key is: 7 37 31 Cursor value is: [object Object] 38 Success opening or iterating cursor39 Cursor direction is: nextunique40 Cursor source is: TestIndex141 Cursor key is: undefined42 Cursor primary key is: undefined43 Cursor value is: undefined44 32 45 33 Starting a new cursor: testCursorDirection('prev', IDBKeyRange.bound('B', 'D', true, true)) … … 62 50 Cursor primary key is: 7 63 51 Cursor value is: [object Object] 64 Success opening or iterating cursor65 Cursor direction is: prev66 Cursor source is: TestIndex167 Cursor key is: undefined68 Cursor primary key is: undefined69 Cursor value is: undefined70 52 71 53 Starting a new cursor: testCursorDirection('prevunique', IDBKeyRange.bound('B', 'D', true, true)) … … 76 58 Cursor primary key is: 9 77 59 Cursor value is: [object Object] 78 Success opening or iterating cursor79 Cursor direction is: prevunique80 Cursor source is: TestIndex181 Cursor key is: undefined82 Cursor primary key is: undefined83 Cursor value is: undefined84 60 85 61 Starting a new cursor: testCursorDirection('next', IDBKeyRange.bound('B', 'C')) … … 120 96 Cursor primary key is: 9 121 97 Cursor value is: [object Object] 122 Success opening or iterating cursor123 Cursor direction is: next124 Cursor source is: TestIndex1125 Cursor key is: undefined126 Cursor primary key is: undefined127 Cursor value is: undefined128 98 129 99 Starting a new cursor: testCursorDirection('nextunique', IDBKeyRange.bound('B', 'C')) … … 140 110 Cursor primary key is: 7 141 111 Cursor value is: [object Object] 142 Success opening or iterating cursor143 Cursor direction is: nextunique144 Cursor source is: TestIndex1145 Cursor key is: undefined146 Cursor primary key is: undefined147 Cursor value is: undefined148 112 149 113 Starting a new cursor: testCursorDirection('prev', IDBKeyRange.bound('B', 'C')) … … 184 148 Cursor primary key is: 4 185 149 Cursor value is: [object Object] 186 Success opening or iterating cursor187 Cursor direction is: prev188 Cursor source is: TestIndex1189 Cursor key is: undefined190 Cursor primary key is: undefined191 Cursor value is: undefined192 150 193 151 Starting a new cursor: testCursorDirection('prevunique', IDBKeyRange.bound('B', 'C')) … … 204 162 Cursor primary key is: 6 205 163 Cursor value is: [object Object] 206 Success opening or iterating cursor207 Cursor direction is: prevunique208 Cursor source is: TestIndex1209 Cursor key is: undefined210 Cursor primary key is: undefined211 Cursor value is: undefined212 164 213 165 Starting a new cursor: testCursorDirection('next', IDBKeyRange.upperBound('B')) … … 248 200 Cursor primary key is: 6 249 201 Cursor value is: [object Object] 250 Success opening or iterating cursor251 Cursor direction is: next252 Cursor source is: TestIndex1253 Cursor key is: undefined254 Cursor primary key is: undefined255 Cursor value is: undefined256 202 257 203 Starting a new cursor: testCursorDirection('nextunique', IDBKeyRange.upperBound('B')) … … 268 214 Cursor primary key is: 4 269 215 Cursor value is: [object Object] 270 Success opening or iterating cursor271 Cursor direction is: nextunique272 Cursor source is: TestIndex1273 Cursor key is: undefined274 Cursor primary key is: undefined275 Cursor value is: undefined276 216 277 217 Starting a new cursor: testCursorDirection('prev', IDBKeyRange.upperBound('B')) … … 312 252 Cursor primary key is: 1 313 253 Cursor value is: [object Object] 314 Success opening or iterating cursor315 Cursor direction is: prev316 Cursor source is: TestIndex1317 Cursor key is: undefined318 Cursor primary key is: undefined319 Cursor value is: undefined320 254 321 255 Starting a new cursor: testCursorDirection('prevunique', IDBKeyRange.upperBound('B')) … … 332 266 Cursor primary key is: 3 333 267 Cursor value is: [object Object] 334 Success opening or iterating cursor335 Cursor direction is: prevunique336 Cursor source is: TestIndex1337 Cursor key is: undefined338 Cursor primary key is: undefined339 Cursor value is: undefined340 268 341 269 Starting a new cursor: testCursorDirection('next', IDBKeyRange.lowerBound('C')) … … 376 304 Cursor primary key is: 12 377 305 Cursor value is: [object Object] 378 Success opening or iterating cursor379 Cursor direction is: next380 Cursor source is: TestIndex1381 Cursor key is: undefined382 Cursor primary key is: undefined383 Cursor value is: undefined384 306 385 307 Starting a new cursor: testCursorDirection('nextunique', IDBKeyRange.lowerBound('C')) … … 396 318 Cursor primary key is: 10 397 319 Cursor value is: [object Object] 398 Success opening or iterating cursor399 Cursor direction is: nextunique400 Cursor source is: TestIndex1401 Cursor key is: undefined402 Cursor primary key is: undefined403 Cursor value is: undefined404 320 405 321 Starting a new cursor: testCursorDirection('prev', IDBKeyRange.lowerBound('C')) … … 440 356 Cursor primary key is: 7 441 357 Cursor value is: [object Object] 442 Success opening or iterating cursor443 Cursor direction is: prev444 Cursor source is: TestIndex1445 Cursor key is: undefined446 Cursor primary key is: undefined447 Cursor value is: undefined448 358 449 359 Starting a new cursor: testCursorDirection('prevunique', IDBKeyRange.lowerBound('C')) … … 460 370 Cursor primary key is: 9 461 371 Cursor value is: [object Object] 462 Success opening or iterating cursor463 Cursor direction is: prevunique464 Cursor source is: TestIndex1465 Cursor key is: undefined466 Cursor primary key is: undefined467 Cursor value is: undefined468 372 469 373 Starting a new cursor: testCursorDirection('next', IDBKeyRange.only('B')) … … 486 390 Cursor primary key is: 6 487 391 Cursor value is: [object Object] 488 Success opening or iterating cursor489 Cursor direction is: next490 Cursor source is: TestIndex1491 Cursor key is: undefined492 Cursor primary key is: undefined493 Cursor value is: undefined494 392 495 393 Starting a new cursor: testCursorDirection('nextunique', IDBKeyRange.only('B')) … … 500 398 Cursor primary key is: 4 501 399 Cursor value is: [object Object] 502 Success opening or iterating cursor503 Cursor direction is: nextunique504 Cursor source is: TestIndex1505 Cursor key is: undefined506 Cursor primary key is: undefined507 Cursor value is: undefined508 400 509 401 Starting a new cursor: testCursorDirection('prev', IDBKeyRange.only('B')) … … 526 418 Cursor primary key is: 4 527 419 Cursor value is: [object Object] 528 Success opening or iterating cursor529 Cursor direction is: prev530 Cursor source is: TestIndex1531 Cursor key is: undefined532 Cursor primary key is: undefined533 Cursor value is: undefined534 420 535 421 Starting a new cursor: testCursorDirection('prevunique', IDBKeyRange.only('B')) … … 540 426 Cursor primary key is: 6 541 427 Cursor value is: [object Object] 542 Success opening or iterating cursor543 Cursor direction is: prevunique544 Cursor source is: TestIndex1545 Cursor key is: undefined546 Cursor primary key is: undefined547 Cursor value is: undefined548 428 Done 549 429 -
trunk/LayoutTests/storage/indexeddb/modern/index-cursor-2.html
r192610 r192800 32 32 { 33 33 request.onsuccess = function() { 34 if (!request.result) { 35 startNextCursor(); 36 return; 37 } 34 38 log("Success opening or iterating cursor"); 35 39 logCursor(request.result); 36 if (request.result.key != undefined) 37 request.result.continue(); 38 else 39 startNextCursor(); 40 request.result.continue(); 40 41 } 41 42 request.onerror = function(e) { -
trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3-expected.txt
r192610 r192800 84 84 Deleted key 18 from object store 85 85 Success opening or iterating cursor 86 Cursor direction is: next87 Cursor source is: TestIndex188 Cursor key is: undefined89 Cursor primary key is: undefined90 Cursor value is: undefined91 86 92 87 Starting a new cursor: testCursorDirection(index, 'prev') … … 172 167 Deleted key 1 from object store 173 168 Success opening or iterating cursor 174 Cursor direction is: prev175 Cursor source is: TestIndex1176 Cursor key is: undefined177 Cursor primary key is: undefined178 Cursor value is: undefined179 169 180 170 Starting a new cursor: testCursorDirection(index, 'nextunique') … … 242 232 Deleted key 1 from object store 243 233 Success opening or iterating cursor 244 Cursor direction is: nextunique245 Cursor source is: TestIndex1246 Cursor key is: undefined247 Cursor primary key is: undefined248 Cursor value is: undefined249 234 250 235 Starting a new cursor: testCursorDirection(index, 'prevunique') … … 311 296 Deleted key 1 from object store 312 297 Success opening or iterating cursor 313 Cursor direction is: prevunique314 Cursor source is: TestIndex1315 Cursor key is: undefined316 Cursor primary key is: undefined317 Cursor value is: undefined318 298 Done 319 299 -
trunk/LayoutTests/storage/indexeddb/modern/index-cursor-3.html
r192610 r192800 36 36 request.onsuccess = function() { 37 37 log("Success opening or iterating cursor"); 38 logCursor(request.result); 38 if (request.result) 39 logCursor(request.result); 39 40 40 if (request. iteratedOnce) {41 if (request.result && request.iteratedOnce) { 41 42 var primaryKey = request.result.primaryKey; 42 43 if (primaryKey) { … … 80 81 request.iteratedOnce = true; 81 82 82 if (request.result .key != undefined)83 if (request.result) 83 84 request.result.continue(); 84 85 else -
trunk/Source/WebCore/ChangeLog
r192798 r192800 1 2015-11-30 Brady Eidson <beidson@apple.com> 2 3 Modern IDB: openCursor() fix resulting in at least 4 more passing tests. 4 https://bugs.webkit.org/show_bug.cgi?id=151630 5 6 Reviewed by Andy Estes. 7 8 No new tests (At least 4 failing tests now pass, and 9 other incorrect tests updated). 9 10 * Modules/indexeddb/IDBGetResult.cpp: 11 (WebCore::IDBGetResult::isolatedCopy): 12 * Modules/indexeddb/IDBGetResult.h: 13 (WebCore::IDBGetResult::IDBGetResult): 14 (WebCore::IDBGetResult::isDefined): 15 16 * Modules/indexeddb/client/IDBRequestImpl.cpp: 17 (WebCore::IDBClient::IDBRequest::didOpenOrIterateCursor): If the IDBGetResult is undefined, 18 do not expose the cursor as the result property of the IDBRequest. 19 1 20 2015-11-30 Brady Eidson <beidson@apple.com> 2 21 -
trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.cpp
r192783 r192800 46 46 result.m_primaryKeyData = m_primaryKeyData.isolatedCopy(); 47 47 result.m_keyPath = m_keyPath.isolatedCopy(); 48 result.m_isDefined = m_isDefined; 48 49 return result; 49 50 } -
trunk/Source/WebCore/Modules/indexeddb/IDBGetResult.h
r192783 r192800 40 40 public: 41 41 IDBGetResult() 42 : m_isDefined(false) 42 43 { 43 44 } … … 91 92 const IDBKeyData& primaryKeyData() const { return m_primaryKeyData; } 92 93 const IDBKeyPath& keyPath() const { return m_keyPath; } 94 bool isDefined() const { return m_isDefined; } 93 95 94 96 // FIXME: When removing LegacyIDB, remove these setters. … … 107 109 IDBKeyData m_primaryKeyData; 108 110 IDBKeyPath m_keyPath; 111 bool m_isDefined { true }; 109 112 }; 110 113 -
trunk/Source/WebCore/Modules/indexeddb/client/IDBRequestImpl.cpp
r192686 r192800 325 325 { 326 326 ASSERT(m_pendingCursor); 327 if (resultData.type() == IDBResultType::IterateCursorSuccess || resultData.type() == IDBResultType::OpenCursorSuccess) 327 m_result = nullptr; 328 329 if (resultData.type() == IDBResultType::IterateCursorSuccess || resultData.type() == IDBResultType::OpenCursorSuccess) { 328 330 m_pendingCursor->setGetResult(*this, resultData.getResult()); 329 330 m_result = IDBAny::create(*m_pendingCursor); 331 if (resultData.getResult().isDefined()) 332 m_result = IDBAny::create(*m_pendingCursor); 333 } 334 331 335 m_pendingCursor = nullptr; 332 336
Note: See TracChangeset
for help on using the changeset viewer.