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

Unified Diff: tests/html/indexeddb_5_test.dart

Issue 18277003: "Reverting 24655" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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_4_test.dart ('k') | tests/html/interactive_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/html/indexeddb_5_test.dart
diff --git a/tests/html/indexeddb_5_test.dart b/tests/html/indexeddb_5_test.dart
index 786cb0b134902926f2cb315efd4597e2285b9e28..826b9d1894cf4b4590cd5fd810c943242370b5d9 100644
--- a/tests/html/indexeddb_5_test.dart
+++ b/tests/html/indexeddb_5_test.dart
@@ -42,25 +42,25 @@ main() {
var value = {'name_index': 'one', 'value': 'add_value'};
test('add/delete', () {
- var transaction = db.transaction(storeName, 'readwrite');
+ var transaction = db.transaction([storeName], 'readwrite');
var key;
return transaction.objectStore(storeName).add(value).then((addedKey) {
key = addedKey;
}).then((_) {
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
return transaction.objectStore(storeName).getObject(key);
}).then((readValue) {
expect(readValue['value'], value['value']);
return transaction.completed;
}).then((_) {
- transaction = db.transactionList([storeName], 'readwrite');
+ transaction = db.transaction([storeName], 'readwrite');
return transaction.objectStore(storeName).delete(key);
}).then((_) {
return transaction.completed;
}).then((_) {
- var transaction = db.transactionList([storeName], 'readonly');
+ var transaction = db.transaction([storeName], 'readonly');
return transaction.objectStore(storeName).count();
}).then((count) {
expect(count, 0);
@@ -68,22 +68,22 @@ main() {
});
test('clear/count', () {
- var transaction = db.transaction(storeName, 'readwrite');
+ var transaction = db.transaction([storeName], 'readwrite');
transaction.objectStore(storeName).add(value);
return transaction.completed.then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
return transaction.objectStore(storeName).count();
}).then((count) {
expect(count, 1);
}).then((_) {
return transaction.completed;
}).then((_) {
- transaction = db.transactionList([storeName], 'readwrite');
+ transaction = db.transaction([storeName], 'readwrite');
transaction.objectStore(storeName).clear();
return transaction.completed;
}).then((_) {
- var transaction = db.transactionList([storeName], 'readonly');
+ var transaction = db.transaction([storeName], 'readonly');
return transaction.objectStore(storeName).count();
}).then((count) {
expect(count, 0);
@@ -91,42 +91,42 @@ main() {
});
test('index', () {
- var transaction = db.transaction(storeName, 'readwrite');
+ var transaction = db.transaction([storeName], 'readwrite');
transaction.objectStore(storeName).add(value);
transaction.objectStore(storeName).add(value);
transaction.objectStore(storeName).add(value);
transaction.objectStore(storeName).add(value);
return transaction.completed.then((_) {
- transaction = db.transactionList([storeName], 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
var index = transaction.objectStore(storeName).index(indexName);
return index.count();
}).then((count) {
expect(count, 4);
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
var index = transaction.objectStore(storeName).index(indexName);
return index.openCursor(autoAdvance: true).length;
}).then((cursorsLength) {
expect(cursorsLength, 4);
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
var index = transaction.objectStore(storeName).index(indexName);
return index.openKeyCursor(autoAdvance: true).length;
}).then((cursorsLength) {
expect(cursorsLength, 4);
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
var index = transaction.objectStore(storeName).index(indexName);
return index.get('one');
}).then((readValue) {
expect(readValue['value'], value['value']);
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readwrite');
+ transaction = db.transaction([storeName], 'readwrite');
transaction.objectStore(storeName).clear();
return transaction.completed;
});
@@ -136,13 +136,13 @@ main() {
var updateValue = {'name_index': 'three', 'value': 'update_value'};
var updatedValue = {'name_index': 'three', 'value': 'updated_value'};
test('cursor', () {
- var transaction = db.transaction(storeName, 'readwrite');
+ var transaction = db.transaction([storeName], 'readwrite');
transaction.objectStore(storeName).add(value);
transaction.objectStore(storeName).add(deleteValue);
transaction.objectStore(storeName).add(updateValue);
return transaction.completed.then((_) {
- transaction = db.transactionList([storeName], 'readwrite');
+ transaction = db.transaction([storeName], 'readwrite');
var index = transaction.objectStore(storeName).index(indexName);
var cursors = index.openCursor().asBroadcastStream();
@@ -165,14 +165,14 @@ main() {
}).then((_) {
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
var index = transaction.objectStore(storeName).index(indexName);
return index.get('three');
}).then((readValue) {
expect(readValue['value'], 'updated_value');
return transaction.completed;
}).then((_) {
- transaction = db.transaction(storeName, 'readonly');
+ transaction = db.transaction([storeName], 'readonly');
var index = transaction.objectStore(storeName).index(indexName);
return index.get('two');
}).then((readValue) {
« no previous file with comments | « tests/html/indexeddb_4_test.dart ('k') | tests/html/interactive_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698