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

Unified Diff: content/browser/indexed_db/indexed_db_transaction_unittest.cc

Issue 185403019: Revert of IndexedDB: Don't timeout read-only transactions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 | « content/browser/indexed_db/indexed_db_transaction.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/indexed_db/indexed_db_transaction_unittest.cc
diff --git a/content/browser/indexed_db/indexed_db_transaction_unittest.cc b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
index 5ad1ff4b00fc85d8856b3ba240c8036fae525aa5..d0228bcd9a14f2e3737e57543270058f8084baae 100644
--- a/content/browser/indexed_db/indexed_db_transaction_unittest.cc
+++ b/content/browser/indexed_db/indexed_db_transaction_unittest.cc
@@ -48,7 +48,7 @@
id,
new MockIndexedDBDatabaseCallbacks(),
scope,
- indexed_db::TRANSACTION_READ_WRITE,
+ indexed_db::TRANSACTION_READ_ONLY,
db_,
new IndexedDBFakeBackingStore::FakeTransaction(commit_success));
db_->TransactionCreated(transaction);
@@ -74,33 +74,6 @@
transaction->ScheduleTask(base::Bind(
&IndexedDBTransactionTest::DummyOperation, base::Unretained(this)));
EXPECT_EQ(IndexedDBTransaction::FINISHED, transaction->state());
- EXPECT_FALSE(transaction->IsTimeoutTimerRunning());
-}
-
-TEST_F(IndexedDBTransactionTest, NoTimeoutReadOnly) {
- const int64 id = 0;
- const std::set<int64> scope;
- const bool commit_success = true;
- scoped_refptr<IndexedDBTransaction> transaction = new IndexedDBTransaction(
- id,
- new MockIndexedDBDatabaseCallbacks(),
- scope,
- indexed_db::TRANSACTION_READ_ONLY,
- db_,
- new IndexedDBFakeBackingStore::FakeTransaction(commit_success));
- db_->TransactionCreated(transaction);
-
- // No conflicting transactions, so coordinator will start it immediately:
- EXPECT_EQ(IndexedDBTransaction::STARTED, transaction->state());
- EXPECT_FALSE(transaction->IsTimeoutTimerRunning());
-
- // Schedule a task - timer won't be started until it's processed.
- transaction->ScheduleTask(base::Bind(
- &IndexedDBTransactionTest::DummyOperation, base::Unretained(this)));
- EXPECT_FALSE(transaction->IsTimeoutTimerRunning());
-
- // Transaction is read-only, so no need to time it out
- RunPostedTasks();
EXPECT_FALSE(transaction->IsTimeoutTimerRunning());
}
« no previous file with comments | « content/browser/indexed_db/indexed_db_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698