OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // These constants should match the ones in renderer_webidbcursor_impl.h | 5 // These constants should match the ones in |
6 // to make sure the test hits the right code paths. | 6 // content/child/indexed_db/webidbcursor_impl.h to make sure the test hits the |
| 7 // right code paths. |
7 var kPrefetchThreshold = 2; | 8 var kPrefetchThreshold = 2; |
8 var kMinPrefetchAmount = 5; | 9 var kMinPrefetchAmount = 5; |
9 | 10 |
10 var kNumberOfItems = 200; | 11 var kNumberOfItems = 200; |
11 | 12 |
12 function test() { | 13 function test() { |
13 indexedDBTest(setVersionSuccess, fillObjectStore); | 14 indexedDBTest(setVersionSuccess, fillObjectStore); |
14 } | 15 } |
15 | 16 |
16 function setVersionSuccess() { | 17 function setVersionSuccess() { |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 401 |
401 if (cursor.key !== count) | 402 if (cursor.key !== count) |
402 shouldBe("cursor.key", "count"); | 403 shouldBe("cursor.key", "count"); |
403 if (cursor.primaryKey !== count) | 404 if (cursor.primaryKey !== count) |
404 shouldBe("cursor.primaryKey", "count"); | 405 shouldBe("cursor.primaryKey", "count"); |
405 | 406 |
406 ++count; | 407 ++count; |
407 cursor.continue(); | 408 cursor.continue(); |
408 }; | 409 }; |
409 } | 410 } |
OLD | NEW |