| Index: chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
|
| diff --git a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
|
| index 9dd1b0197ce7fefcb02257765c8a03a63a8695e7..dc64735c2e9efa1a3bf1201d42796e1d49797830 100644
|
| --- a/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
|
| +++ b/chrome/browser/predictors/autocomplete_action_predictor_table_unittest.cc
|
| @@ -4,14 +4,15 @@
|
|
|
| #include <vector>
|
|
|
| -#include "base/message_loop/message_loop.h"
|
| +#include "base/run_loop.h"
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "base/time/time.h"
|
| #include "chrome/browser/predictors/autocomplete_action_predictor_table.h"
|
| #include "chrome/browser/predictors/predictor_database.h"
|
| #include "chrome/browser/predictors/predictor_database_factory.h"
|
| #include "chrome/test/base/testing_profile.h"
|
| -#include "content/public/test/test_browser_thread.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| +#include "content/public/test/test_browser_thread_bundle.h"
|
| #include "sql/statement.h"
|
|
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -24,10 +25,7 @@ using predictors::AutocompleteActionPredictorTable;
|
| namespace predictors {
|
|
|
| class AutocompleteActionPredictorTableTest : public testing::Test {
|
| - public:
|
| - AutocompleteActionPredictorTableTest();
|
| - virtual ~AutocompleteActionPredictorTableTest();
|
| -
|
| + protected:
|
| virtual void SetUp();
|
| virtual void TearDown();
|
|
|
| @@ -40,8 +38,6 @@ class AutocompleteActionPredictorTableTest : public testing::Test {
|
|
|
| TestingProfile* profile() { return &profile_; }
|
|
|
| - protected:
|
| -
|
| // Test functions that can be run against this text fixture or
|
| // AutocompleteActionPredictorTableReopenTest that inherits from this.
|
| void TestGetRow();
|
| @@ -52,15 +48,14 @@ class AutocompleteActionPredictorTableTest : public testing::Test {
|
| AutocompleteActionPredictorTable::Rows test_db_;
|
|
|
| private:
|
| + content::TestBrowserThreadBundle thread_bundle_;
|
| TestingProfile profile_;
|
| scoped_ptr<PredictorDatabase> db_;
|
| - base::MessageLoop loop_;
|
| - content::TestBrowserThread db_thread_;
|
| };
|
|
|
| class AutocompleteActionPredictorTableReopenTest
|
| : public AutocompleteActionPredictorTableTest {
|
| - public:
|
| + protected:
|
| virtual void SetUp() {
|
| // By calling SetUp twice, we make sure that the table already exists for
|
| // this fixture.
|
| @@ -70,17 +65,9 @@ class AutocompleteActionPredictorTableReopenTest
|
| }
|
| };
|
|
|
| -AutocompleteActionPredictorTableTest::AutocompleteActionPredictorTableTest()
|
| - : loop_(base::MessageLoop::TYPE_DEFAULT),
|
| - db_thread_(BrowserThread::DB, &loop_) {
|
| -}
|
| -
|
| -AutocompleteActionPredictorTableTest::~AutocompleteActionPredictorTableTest() {
|
| -}
|
| -
|
| void AutocompleteActionPredictorTableTest::SetUp() {
|
| db_.reset(new PredictorDatabase(&profile_));
|
| - loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
|
|
| test_db_.push_back(AutocompleteActionPredictorTable::Row(
|
| "BD85DBA2-8C29-49F9-84AE-48E1E90880DF",
|
| @@ -98,7 +85,7 @@ void AutocompleteActionPredictorTableTest::SetUp() {
|
|
|
| void AutocompleteActionPredictorTableTest::TearDown() {
|
| db_.reset(NULL);
|
| - loop_.RunUntilIdle();
|
| + base::RunLoop().RunUntilIdle();
|
| test_db_.clear();
|
| }
|
|
|
|
|