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

Unified Diff: chrome/test/data/indexeddb/cursor_test.js

Issue 5695002: IndexedDB: Numeric keys are floating point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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
« no previous file with comments | « chrome/common/indexed_db_param_traits.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/data/indexeddb/cursor_test.js
diff --git a/chrome/test/data/indexeddb/cursor_test.js b/chrome/test/data/indexeddb/cursor_test.js
index 1c6b40c762bfc54e889237d9df233d383483be86..968cc5f6009526a63d131f07524b5f252d3fb89b 100644
--- a/chrome/test/data/indexeddb/cursor_test.js
+++ b/chrome/test/data/indexeddb/cursor_test.js
@@ -28,7 +28,7 @@ function cursorSuccess()
debug('Cursor opened successfully.');
shouldBe("event.result.direction", "0");
- shouldBe("event.result.key", "'myKey'");
+ shouldBe("event.result.key", "3.14");
shouldBe("event.result.value", "'myValue'");
cursor.continue();
@@ -37,7 +37,7 @@ function cursorSuccess()
function openCursor(objectStore)
{
debug('Opening cursor');
- var keyRange = webkitIDBKeyRange.lowerBound('myKey');
+ var keyRange = webkitIDBKeyRange.lowerBound(3.12);
jorlow 2010/12/09 17:40:19 Is 3.12 intentional?
hans 2010/12/09 17:42:30 Yes, but there's no deep rationale for it. Just fi
var result = objectStore.openCursor({range: keyRange});
result.onsuccess = cursorSuccess;
result.onerror = unexpectedErrorCallback;
@@ -54,7 +54,7 @@ function populateObjectStore()
debug('Populating object store');
deleteAllObjectStores(db);
window.objectStore = db.createObjectStore('test');
- var result = objectStore.add('myValue', 'myKey');
+ var result = objectStore.add('myValue', 3.14);
result.onsuccess = dataAddedSuccess;
result.onerror = unexpectedErrorCallback;
}
« no previous file with comments | « chrome/common/indexed_db_param_traits.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698