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

Unified Diff: tests/html/indexeddb_4_test.dart

Issue 10448075: Fix indexeddb_4_test. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 7 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
« no previous file with comments | « tests/html/indexeddb_3_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/indexeddb_4_test.dart
diff --git a/tests/html/indexeddb_4_test.dart b/tests/html/indexeddb_4_test.dart
index 28fefb30f40676170a99299c8dad3b1cfef78662..3303677bb8e505ba39454d55bdead1ab8d29159d 100644
--- a/tests/html/indexeddb_4_test.dart
+++ b/tests/html/indexeddb_4_test.dart
@@ -40,7 +40,7 @@ class Test {
writeItems(int index) {
if (index < 100) {
- var transaction = db.transaction([STORE_NAME], IDBTransaction.READ_WRITE);
+ var transaction = db.transaction([STORE_NAME], 'readwrite');
var request = transaction.objectStore(STORE_NAME)
.put('Item $index', index);
request.on.success.add(
@@ -59,19 +59,19 @@ class Test {
};
testRange(range, expectedFirst, expectedLast) {
- IDBTransaction txn = db.transaction(STORE_NAME, IDBTransaction.READ_ONLY);
+ IDBTransaction txn = db.transaction(STORE_NAME, 'readonly');
IDBObjectStore objectStore = txn.objectStore(STORE_NAME);
IDBRequest cursorRequest = objectStore.openCursor(range);
int itemCount = 0;
- int firstKey = null;
- int lastKey = null;
+ num firstKey = null;
+ num lastKey = null;
cursorRequest.on.success.add(expectAsync1((e) {
var cursor = e.target.result;
if (cursor != null) {
if (firstKey == null) firstKey = cursor.key;
lastKey = cursor.key;
itemCount += 1;
- Expect.equals('Item ${cursor.key}', cursor.value);
+ Expect.equals('Item ${cursor.key.toStringAsFixed(0)}', cursor.value);
sra1 2012/05/31 15:34:38 It still bothers me a lot that the keys that were
podivilov 2012/05/31 17:08:24 Filed a bug: http://code.google.com/p/dart/issues/
cursor.continueFunction();
} else {
// Done
@@ -142,5 +142,4 @@ main() {
test('bound3', test_.bound3);
test('bound4', test_.bound4);
test('bound5', test_.bound5);
-
}
« no previous file with comments | « tests/html/indexeddb_3_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698