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.h" | 7 #include "base/message_loop.h" |
8 #include "base/time.h" | 8 #include "base/time.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/predictors/autocomplete_action_predictor_table.h" | 10 #include "chrome/browser/predictors/autocomplete_action_predictor_table.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 AutocompleteActionPredictorTableTest::AutocompleteActionPredictorTableTest() | 73 AutocompleteActionPredictorTableTest::AutocompleteActionPredictorTableTest() |
74 : loop_(MessageLoop::TYPE_DEFAULT), | 74 : loop_(MessageLoop::TYPE_DEFAULT), |
75 db_thread_(BrowserThread::DB, &loop_) { | 75 db_thread_(BrowserThread::DB, &loop_) { |
76 } | 76 } |
77 | 77 |
78 AutocompleteActionPredictorTableTest::~AutocompleteActionPredictorTableTest() { | 78 AutocompleteActionPredictorTableTest::~AutocompleteActionPredictorTableTest() { |
79 } | 79 } |
80 | 80 |
81 void AutocompleteActionPredictorTableTest::SetUp() { | 81 void AutocompleteActionPredictorTableTest::SetUp() { |
82 db_.reset(new PredictorDatabase(&profile_)); | 82 db_.reset(new PredictorDatabase(&profile_)); |
83 loop_.RunAllPending(); | 83 loop_.RunUntilIdle(); |
84 | 84 |
85 test_db_.push_back(AutocompleteActionPredictorTable::Row( | 85 test_db_.push_back(AutocompleteActionPredictorTable::Row( |
86 "BD85DBA2-8C29-49F9-84AE-48E1E90880DF", | 86 "BD85DBA2-8C29-49F9-84AE-48E1E90880DF", |
87 ASCIIToUTF16("goog"), GURL("http://www.google.com/"), | 87 ASCIIToUTF16("goog"), GURL("http://www.google.com/"), |
88 1, 0)); | 88 1, 0)); |
89 test_db_.push_back(AutocompleteActionPredictorTable::Row( | 89 test_db_.push_back(AutocompleteActionPredictorTable::Row( |
90 "BD85DBA2-8C29-49F9-84AE-48E1E90880E0", | 90 "BD85DBA2-8C29-49F9-84AE-48E1E90880E0", |
91 ASCIIToUTF16("slash"), GURL("http://slashdot.org/"), | 91 ASCIIToUTF16("slash"), GURL("http://slashdot.org/"), |
92 3, 2)); | 92 3, 2)); |
93 test_db_.push_back(AutocompleteActionPredictorTable::Row( | 93 test_db_.push_back(AutocompleteActionPredictorTable::Row( |
(...skipping 136 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 |