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

Unified Diff: LayoutTests/storage/indexeddb/index-getallkeys.html

Issue 1303983002: IndexedDB: Treat count of 0 as unbounded for getAll() methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Review feedback Created 5 years, 4 months 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: LayoutTests/storage/indexeddb/index-getallkeys.html
diff --git a/LayoutTests/storage/indexeddb/index-getallkeys.html b/LayoutTests/storage/indexeddb/index-getallkeys.html
index 652fbca76d075b29b3b965c76d4e125ef291a4e6..5d5964b0194d1cfc43c3b8b8c40893d648339922 100644
--- a/LayoutTests/storage/indexeddb/index-getallkeys.html
+++ b/LayoutTests/storage/indexeddb/index-getallkeys.html
@@ -60,7 +60,8 @@ function createGetAllKeysRequest(t, storeName, connection, range, maxCount) {
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();
+ range !== undefined ? index.getAllKeys(range) :
+ index.getAllKeys();
req.onerror = t.unreached_func('getAllKeys request should succeed');
return req;
}
@@ -182,13 +183,13 @@ doSetup(location.pathname + '-IDBIndex.getAllKeys', 1, function(evt) {
}, 'Non existent key');
async_test(function(t) {
- var transaction = connection.transaction('out-of-line', 'readonly');
- var store = transaction.objectStore('out-of-line');
- var index = store.index('test_idx');
- assert_throws(new TypeError(), function () {
- index.getAllKeys(undefined, 0);
- }, 'getAllKeys() with maxCount=0 should throw TypeError');
- t.done();
+ var req = createGetAllKeysRequest(t, 'out-of-line', connection,
+ undefined, 0);
+ req.onsuccess = t.step_func(function(evt) {
+ assert_array_equals(evt.target.result, alphabet,
+ 'getAllKeys() should return a..z');
+ t.done();
+ });
}, 'maxCount=0');
async_test(function(t) {
« no previous file with comments | « LayoutTests/storage/indexeddb/index-getall.html ('k') | LayoutTests/storage/indexeddb/objectstore-getall.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698