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 "chrome/browser/autocomplete/history_quick_provider.h" | 5 #include "chrome/browser/autocomplete/history_quick_provider.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <functional> | 8 #include <functional> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // As above, simply with a cursor position specified. | 156 // As above, simply with a cursor position specified. |
157 void RunTestWithCursor(const base::string16 text, | 157 void RunTestWithCursor(const base::string16 text, |
158 const size_t cursor_position, | 158 const size_t cursor_position, |
159 bool prevent_inline_autocomplete, | 159 bool prevent_inline_autocomplete, |
160 std::vector<std::string> expected_urls, | 160 std::vector<std::string> expected_urls, |
161 bool can_inline_top_result, | 161 bool can_inline_top_result, |
162 base::string16 expected_fill_into_edit, | 162 base::string16 expected_fill_into_edit, |
163 base::string16 autocompletion); | 163 base::string16 autocompletion); |
164 | 164 |
165 history::HistoryBackend* history_backend() { | 165 history::HistoryBackend* history_backend() { |
166 return history_service_->history_backend_; | 166 return history_service_->history_backend_.get(); |
167 } | 167 } |
168 | 168 |
169 base::MessageLoopForUI message_loop_; | 169 base::MessageLoopForUI message_loop_; |
170 content::TestBrowserThread ui_thread_; | 170 content::TestBrowserThread ui_thread_; |
171 content::TestBrowserThread file_thread_; | 171 content::TestBrowserThread file_thread_; |
172 | 172 |
173 scoped_ptr<TestingProfile> profile_; | 173 scoped_ptr<TestingProfile> profile_; |
174 HistoryService* history_service_; | 174 HistoryService* history_service_; |
175 | 175 |
176 ACMatches ac_matches_; // The resulting matches after running RunTest. | 176 ACMatches ac_matches_; // The resulting matches after running RunTest. |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
775 | 775 |
776 TEST_F(HQPOrderingTest, TEAMatch) { | 776 TEST_F(HQPOrderingTest, TEAMatch) { |
777 std::vector<std::string> expected_urls; | 777 std::vector<std::string> expected_urls; |
778 expected_urls.push_back("http://www.teamliquid.net/"); | 778 expected_urls.push_back("http://www.teamliquid.net/"); |
779 expected_urls.push_back("http://www.teamliquid.net/tlpd"); | 779 expected_urls.push_back("http://www.teamliquid.net/tlpd"); |
780 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); | 780 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); |
781 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, | 781 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, |
782 ASCIIToUTF16("www.teamliquid.net"), | 782 ASCIIToUTF16("www.teamliquid.net"), |
783 ASCIIToUTF16("mliquid.net")); | 783 ASCIIToUTF16("mliquid.net")); |
784 } | 784 } |
OLD | NEW |