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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 // Test functions that can be run against this text fixture or | 45 // Test functions that can be run against this text fixture or |
46 // AutocompleteActionPredictorTableReopenTest that inherits from this. | 46 // AutocompleteActionPredictorTableReopenTest that inherits from this. |
47 void TestGetRow(); | 47 void TestGetRow(); |
48 void TestAddAndUpdateRows(); | 48 void TestAddAndUpdateRows(); |
49 void TestDeleteRows(); | 49 void TestDeleteRows(); |
50 void TestDeleteAllRows(); | 50 void TestDeleteAllRows(); |
51 | 51 |
52 AutocompleteActionPredictorTable::Rows test_db_; | 52 AutocompleteActionPredictorTable::Rows test_db_; |
53 | 53 |
54 private: | 54 private: |
| 55 base::MessageLoop loop_; |
55 TestingProfile profile_; | 56 TestingProfile profile_; |
56 scoped_ptr<PredictorDatabase> db_; | 57 scoped_ptr<PredictorDatabase> db_; |
57 base::MessageLoop loop_; | |
58 content::TestBrowserThread db_thread_; | 58 content::TestBrowserThread db_thread_; |
59 }; | 59 }; |
60 | 60 |
61 class AutocompleteActionPredictorTableReopenTest | 61 class AutocompleteActionPredictorTableReopenTest |
62 : public AutocompleteActionPredictorTableTest { | 62 : public AutocompleteActionPredictorTableTest { |
63 public: | 63 public: |
64 void SetUp() override { | 64 void SetUp() override { |
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(); |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 | 230 |
231 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteRows) { | 231 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteRows) { |
232 TestDeleteRows(); | 232 TestDeleteRows(); |
233 } | 233 } |
234 | 234 |
235 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteAllRows) { | 235 TEST_F(AutocompleteActionPredictorTableReopenTest, DeleteAllRows) { |
236 TestDeleteAllRows(); | 236 TestDeleteAllRows(); |
237 } | 237 } |
238 | 238 |
239 } // namespace predictors | 239 } // namespace predictors |
OLD | NEW |