Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: third_party/WebKit/LayoutTests/imported/web-platform-tests/IndexedDB/idbobjectstore_getAllKeys.html

Issue 1419013007: update-w3c-deps import using blink 83a52878976eaffc8753993a7689c9c178664fba: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>

Powered by Google App Engine
This is Rietveld 408576698