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

Side by Side Diff: content/browser/indexed_db/indexed_db_transaction_unittest.cc

Issue 2082343002: Remove calls to deprecated MessageLoop methods in content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: CR Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/indexed_db/indexed_db_transaction.h" 5 #include "content/browser/indexed_db/indexed_db_transaction.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 // https://github.com/google/googletest/blob/master/googletest/docs/FAQ.md#m y-compiler-complains-that-a-constructor-or-destructor-cannot-return-a-value-what s-going-on 47 // https://github.com/google/googletest/blob/master/googletest/docs/FAQ.md#m y-compiler-complains-that-a-constructor-or-destructor-cannot-return-a-value-what s-going-on
48 leveldb::Status s; 48 leveldb::Status s;
49 db_ = IndexedDBDatabase::Create(base::ASCIIToUTF16("db"), 49 db_ = IndexedDBDatabase::Create(base::ASCIIToUTF16("db"),
50 backing_store_.get(), 50 backing_store_.get(),
51 factory_.get(), 51 factory_.get(),
52 IndexedDBDatabase::Identifier(), 52 IndexedDBDatabase::Identifier(),
53 &s); 53 &s);
54 ASSERT_TRUE(s.ok()); 54 ASSERT_TRUE(s.ok());
55 } 55 }
56 56
57 void RunPostedTasks() { message_loop_.RunUntilIdle(); } 57 void RunPostedTasks() { base::RunLoop().RunUntilIdle(); }
58 void DummyOperation(IndexedDBTransaction* transaction) {} 58 void DummyOperation(IndexedDBTransaction* transaction) {}
59 void AbortableOperation(AbortObserver* observer, 59 void AbortableOperation(AbortObserver* observer,
60 IndexedDBTransaction* transaction) { 60 IndexedDBTransaction* transaction) {
61 transaction->ScheduleAbortTask( 61 transaction->ScheduleAbortTask(
62 base::Bind(&AbortObserver::AbortTask, base::Unretained(observer))); 62 base::Bind(&AbortObserver::AbortTask, base::Unretained(observer)));
63 } 63 }
64 64
65 protected: 65 protected:
66 scoped_refptr<IndexedDBFakeBackingStore> backing_store_; 66 scoped_refptr<IndexedDBFakeBackingStore> backing_store_;
67 scoped_refptr<IndexedDBDatabase> db_; 67 scoped_refptr<IndexedDBDatabase> db_;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 static const blink::WebIDBTransactionMode kTestModes[] = { 365 static const blink::WebIDBTransactionMode kTestModes[] = {
366 blink::WebIDBTransactionModeReadOnly, blink::WebIDBTransactionModeReadWrite, 366 blink::WebIDBTransactionModeReadOnly, blink::WebIDBTransactionModeReadWrite,
367 blink::WebIDBTransactionModeVersionChange}; 367 blink::WebIDBTransactionModeVersionChange};
368 368
369 INSTANTIATE_TEST_CASE_P(IndexedDBTransactions, 369 INSTANTIATE_TEST_CASE_P(IndexedDBTransactions,
370 IndexedDBTransactionTestMode, 370 IndexedDBTransactionTestMode,
371 ::testing::ValuesIn(kTestModes)); 371 ::testing::ValuesIn(kTestModes));
372 372
373 } // namespace content 373 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698