| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 <vector> | 5 #include <vector> |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "chrome/browser/predictors/autocomplete_action_predictor_table.h" | 10 #include "chrome/browser/predictors/autocomplete_action_predictor_table.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual void SetUp() { | 64 virtual void SetUp() { |
| 65 // By calling SetUp twice, we make sure that the table already exists for | 65 // By calling SetUp twice, we make sure that the table already exists for |
| 66 // this fixture. | 66 // this fixture. |
| 67 AutocompleteActionPredictorTableTest::SetUp(); | 67 AutocompleteActionPredictorTableTest::SetUp(); |
| 68 AutocompleteActionPredictorTableTest::TearDown(); | 68 AutocompleteActionPredictorTableTest::TearDown(); |
| 69 AutocompleteActionPredictorTableTest::SetUp(); | 69 AutocompleteActionPredictorTableTest::SetUp(); |
| 70 } | 70 } |
| 71 }; | 71 }; |
| 72 | 72 |
| 73 AutocompleteActionPredictorTableTest::AutocompleteActionPredictorTableTest() | 73 AutocompleteActionPredictorTableTest::AutocompleteActionPredictorTableTest() |
| 74 : loop_(base::MessageLoop::TYPE_DEFAULT), | 74 : db_thread_(BrowserThread::DB, &loop_) { |
| 75 db_thread_(BrowserThread::DB, &loop_) { | |
| 76 } | 75 } |
| 77 | 76 |
| 78 AutocompleteActionPredictorTableTest::~AutocompleteActionPredictorTableTest() { | 77 AutocompleteActionPredictorTableTest::~AutocompleteActionPredictorTableTest() { |
| 79 } | 78 } |
| 80 | 79 |
| 81 void AutocompleteActionPredictorTableTest::SetUp() { | 80 void AutocompleteActionPredictorTableTest::SetUp() { |
| 82 db_.reset(new PredictorDatabase(&profile_)); | 81 db_.reset(new PredictorDatabase(&profile_)); |
| 83 loop_.RunUntilIdle(); | 82 loop_.RunUntilIdle(); |
| 84 | 83 |
| 85 test_db_.push_back(AutocompleteActionPredictorTable::Row( | 84 test_db_.push_back(AutocompleteActionPredictorTable::Row( |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 231 | 230 |
| 232 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteRows) { | 231 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteRows) { |
| 233 TestDeleteRows(); | 232 TestDeleteRows(); |
| 234 } | 233 } |
| 235 | 234 |
| 236 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteAllRows) { | 235 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteAllRows) { |
| 237 TestDeleteAllRows(); | 236 TestDeleteAllRows(); |
| 238 } | 237 } |
| 239 | 238 |
| 240 } // namespace predictors | 239 } // namespace predictors |
| OLD | NEW |