| Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html
|
| diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/objectstore-getallkeys.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html
|
| similarity index 90%
|
| rename from third_party/WebKit/LayoutTests/storage/indexeddb/objectstore-getallkeys.html
|
| rename to third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html
|
| index 8ca26eac529be274ab0c62da1df9e305668a6f27..1cff9165e949f0f140d28f050eb70385ff67a9f1 100644
|
| --- a/third_party/WebKit/LayoutTests/storage/indexeddb/objectstore-getallkeys.html
|
| +++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html
|
| @@ -1,8 +1,9 @@
|
| <!DOCTYPE html>
|
| <title>IndexedDB: Test IDBObjectStore.getAllKeys.</title>
|
| -<script src="../../resources/testharness.js"></script>
|
| -<script src="../../resources/testharnessreport.js"></script>
|
| +<script src="../../../resources/testharness.js"></script>
|
| +<script src="../../../resources/testharnessreport.js"></script>
|
| <script>
|
| +setup({explicit_done: true});
|
|
|
| var alphabet = 'abcdefghijklmnopqrstuvwxyz'.split('');
|
|
|
| @@ -39,10 +40,7 @@ function doSetup(dbName, dbVersion, onsuccess) {
|
| function createGetAllKeysRequest(t, storeName, connection, range, maxCount) {
|
| var transaction = connection.transaction(storeName, 'readonly');
|
| var store = transaction.objectStore(storeName);
|
| - // TODO(cmumford): Simplify once crbug.com/335871 is closed.
|
| - var req = maxCount !== undefined ? store.getAllKeys(range, maxCount) :
|
| - range !== undefined ? store.getAllKeys(range) :
|
| - store.getAllKeys();
|
| + var req = store.getAllKeys(range, maxCount);
|
| req.onerror = t.unreached_func('getAllKeys request should succeed');
|
| return req;
|
| }
|
| @@ -89,8 +87,7 @@ doSetup(location.pathname + '-IDBObjectStore.getAllKeys', 1, function(evt) {
|
| var req = createGetAllKeysRequest(t, 'out-of-line', connection, undefined,
|
| 10);
|
| req.onsuccess = t.step_func(function(evt) {
|
| - assert_array_equals(evt.target.result,
|
| - ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j']);
|
| + assert_array_equals(evt.target.result, 'abcdefghij'.split(''));
|
| t.done();
|
| });
|
| }, 'Test maxCount');
|
| @@ -99,8 +96,7 @@ doSetup(location.pathname + '-IDBObjectStore.getAllKeys', 1, function(evt) {
|
| var req = createGetAllKeysRequest(t, 'out-of-line', connection,
|
| IDBKeyRange.bound('g', 'm'));
|
| req.onsuccess = t.step_func(function(evt) {
|
| - assert_array_equals(evt.target.result,
|
| - ['g', 'h', 'i', 'j', 'k', 'l', 'm']);
|
| + assert_array_equals(evt.target.result, 'ghijklm'.split(''));
|
| t.done();
|
| });
|
| }, 'Get bound range');
|
| @@ -163,6 +159,9 @@ doSetup(location.pathname + '-IDBObjectStore.getAllKeys', 1, function(evt) {
|
| t.done();
|
| });
|
| }, 'zero maxCount');
|
| +
|
| + // Explicit done needed in case async_test body fails synchronously.
|
| + done();
|
| });
|
|
|
| </script>
|
|
|