Index: third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbindex_getAllKeys.html |
diff --git a/third_party/WebKit/LayoutTests/storage/indexeddb/index-getallkeys.html b/third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbindex_getAllKeys.html |
similarity index 92% |
rename from third_party/WebKit/LayoutTests/storage/indexeddb/index-getallkeys.html |
rename to third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbindex_getAllKeys.html |
index 5d5964b0194d1cfc43c3b8b8c40893d648339922..4d46a18a7d9389530632e82061626d5884ccc1e8 100644 |
--- a/third_party/WebKit/LayoutTests/storage/indexeddb/index-getallkeys.html |
+++ b/third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbindex_getAllKeys.html |
@@ -1,8 +1,9 @@ |
<!DOCTYPE html> |
<title>IndexedDB: Test IDBIndex.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(''); |
@@ -58,10 +59,7 @@ function createGetAllKeysRequest(t, storeName, connection, range, maxCount) { |
var transaction = connection.transaction(storeName, 'readonly'); |
var store = transaction.objectStore(storeName); |
var index = store.index('test_idx'); |
- // TODO(cmumford): Simplify once crbug.com/335871 is fixed. |
- var req = maxCount !== undefined ? index.getAllKeys(range, maxCount) : |
- range !== undefined ? index.getAllKeys(range) : |
- index.getAllKeys(); |
+ var req = index.getAllKeys(range, maxCount); |
req.onerror = t.unreached_func('getAllKeys request should succeed'); |
return req; |
} |
@@ -111,7 +109,7 @@ doSetup(location.pathname + '-IDBIndex.getAllKeys', 1, function(evt) { |
10); |
req.onsuccess = t.step_func(function(evt) { |
assert_array_equals(evt.target.result, |
- ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'], |
+ 'abcdefghij'.split(''), |
'getAllKeys() should return a..j'); |
t.done(); |
}); |
@@ -122,8 +120,8 @@ doSetup(location.pathname + '-IDBIndex.getAllKeys', 1, function(evt) { |
IDBKeyRange.bound('G', 'M')); |
req.onsuccess = t.step_func(function(evt) { |
assert_array_equals(evt.target.result, |
- ['g', 'h', 'i', 'j', 'k', 'l', 'm'], |
- 'getAllKeys() should return g..m'); |
+ 'ghijklm'.split(''), |
+ 'getAllKeys() should return g..m'); |
t.done(); |
}); |
}, 'Get bound range'); |
@@ -201,6 +199,9 @@ doSetup(location.pathname + '-IDBIndex.getAllKeys', 1, function(evt) { |
}); |
req.onerror = t.unreached_func('getAllKeys request should succeed'); |
}, 'Retrieve multiEntry keys'); |
+ |
+ // Explicit done needed in case async_test body fails synchronously. |
+ done(); |
}); |
</script> |