OLD | NEW |
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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
6 #include "base/bind.h" | 6 #include "base/bind.h" |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/stringprintf.h" | 10 #include "base/stringprintf.h" |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 ? (*known_results_.get())[result_id] | 151 ? (*known_results_.get())[result_id] |
152 : UNKNOWN_RESULT; | 152 : UNKNOWN_RESULT; |
153 } | 153 } |
154 | 154 |
155 History* history() { return history_.get(); } | 155 History* history() { return history_.get(); } |
156 const HistoryData::Associations& associations() const { | 156 const HistoryData::Associations& associations() const { |
157 return history_->data_->associations(); | 157 return history_->data_->associations(); |
158 } | 158 } |
159 | 159 |
160 private: | 160 private: |
161 MessageLoopForUI message_loop_; | 161 base::MessageLoopForUI message_loop_; |
162 content::TestBrowserThread ui_thread_; | 162 content::TestBrowserThread ui_thread_; |
163 scoped_ptr<TestingProfile> profile_; | 163 scoped_ptr<TestingProfile> profile_; |
164 | 164 |
165 scoped_ptr<History> history_; | 165 scoped_ptr<History> history_; |
166 scoped_ptr<KnownResults> known_results_; | 166 scoped_ptr<KnownResults> known_results_; |
167 | 167 |
168 DISALLOW_COPY_AND_ASSIGN(SearchHistoryTest); | 168 DISALLOW_COPY_AND_ASSIGN(SearchHistoryTest); |
169 }; | 169 }; |
170 | 170 |
171 TEST_F(SearchHistoryTest, Persistence) { | 171 TEST_F(SearchHistoryTest, Persistence) { |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
310 | 310 |
311 // The oldest secondary is gone. | 311 // The oldest secondary is gone. |
312 EXPECT_EQ(UNKNOWN_RESULT, GetResultType("1")); | 312 EXPECT_EQ(UNKNOWN_RESULT, GetResultType("1")); |
313 | 313 |
314 // Touched oldest survived. | 314 // Touched oldest survived. |
315 EXPECT_EQ(PERFECT_SECONDARY, GetResultType("0")); | 315 EXPECT_EQ(PERFECT_SECONDARY, GetResultType("0")); |
316 } | 316 } |
317 | 317 |
318 } // namespace test | 318 } // namespace test |
319 } // namespace app_list | 319 } // namespace app_list |
OLD | NEW |