| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 explicit SetShouldContain(const ACMatches& matched_urls); | 104 explicit SetShouldContain(const ACMatches& matched_urls); |
| 105 | 105 |
| 106 void operator()(const std::string& expected); | 106 void operator()(const std::string& expected); |
| 107 | 107 |
| 108 std::set<std::string> LeftOvers() const { return matches_; } | 108 std::set<std::string> LeftOvers() const { return matches_; } |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 std::set<std::string> matches_; | 111 std::set<std::string> matches_; |
| 112 }; | 112 }; |
| 113 | 113 |
| 114 static ProfileKeyedService* CreateTemplateURLService( | 114 static BrowserContextKeyedService* CreateTemplateURLService( |
| 115 content::BrowserContext* profile) { | 115 content::BrowserContext* profile) { |
| 116 return new TemplateURLService(static_cast<Profile*>(profile)); | 116 return new TemplateURLService(static_cast<Profile*>(profile)); |
| 117 } | 117 } |
| 118 | 118 |
| 119 virtual void SetUp(); | 119 virtual void SetUp(); |
| 120 virtual void TearDown(); | 120 virtual void TearDown(); |
| 121 | 121 |
| 122 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); | 122 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); |
| 123 | 123 |
| 124 // Fills test data into the history system. | 124 // Fills test data into the history system. |
| (...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 615 } | 615 } |
| 616 | 616 |
| 617 TEST_F(HQPOrderingTest, TEAMatch) { | 617 TEST_F(HQPOrderingTest, TEAMatch) { |
| 618 std::vector<std::string> expected_urls; | 618 std::vector<std::string> expected_urls; |
| 619 expected_urls.push_back("http://www.teamliquid.net/"); | 619 expected_urls.push_back("http://www.teamliquid.net/"); |
| 620 expected_urls.push_back("http://www.teamliquid.net/tlpd"); | 620 expected_urls.push_back("http://www.teamliquid.net/tlpd"); |
| 621 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); | 621 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); |
| 622 RunTest(ASCIIToUTF16("tea"), expected_urls, true, | 622 RunTest(ASCIIToUTF16("tea"), expected_urls, true, |
| 623 ASCIIToUTF16("www.teamliquid.net")); | 623 ASCIIToUTF16("www.teamliquid.net")); |
| 624 } | 624 } |
| OLD | NEW |