| 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 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 void operator()(const std::string& expected); | 123 void operator()(const std::string& expected); |
| 124 | 124 |
| 125 std::set<std::string> LeftOvers() const { return matches_; } | 125 std::set<std::string> LeftOvers() const { return matches_; } |
| 126 | 126 |
| 127 private: | 127 private: |
| 128 std::set<std::string> matches_; | 128 std::set<std::string> matches_; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 static KeyedService* CreateTemplateURLService( | 131 static KeyedService* CreateTemplateURLService( |
| 132 content::BrowserContext* profile) { | 132 content::BrowserContext* profile) { |
| 133 return new TemplateURLService(static_cast<Profile*>(profile), NULL); | 133 return new TemplateURLService(static_cast<Profile*>(profile), NULL, |
| 134 base::Closure()); |
| 134 } | 135 } |
| 135 | 136 |
| 136 virtual void SetUp(); | 137 virtual void SetUp(); |
| 137 virtual void TearDown(); | 138 virtual void TearDown(); |
| 138 | 139 |
| 139 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); | 140 virtual void GetTestData(size_t* data_count, TestURLInfo** test_data); |
| 140 | 141 |
| 141 // Fills test data into the history system. | 142 // Fills test data into the history system. |
| 142 void FillData(); | 143 void FillData(); |
| 143 | 144 |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 733 | 734 |
| 734 TEST_F(HQPOrderingTest, TEAMatch) { | 735 TEST_F(HQPOrderingTest, TEAMatch) { |
| 735 std::vector<std::string> expected_urls; | 736 std::vector<std::string> expected_urls; |
| 736 expected_urls.push_back("http://www.teamliquid.net/"); | 737 expected_urls.push_back("http://www.teamliquid.net/"); |
| 737 expected_urls.push_back("http://www.teamliquid.net/tlpd"); | 738 expected_urls.push_back("http://www.teamliquid.net/tlpd"); |
| 738 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); | 739 expected_urls.push_back("http://www.teamliquid.net/tlpd/korean/players"); |
| 739 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, | 740 RunTest(ASCIIToUTF16("tea"), false, expected_urls, true, |
| 740 ASCIIToUTF16("www.teamliquid.net"), | 741 ASCIIToUTF16("www.teamliquid.net"), |
| 741 ASCIIToUTF16("mliquid.net")); | 742 ASCIIToUTF16("mliquid.net")); |
| 742 } | 743 } |
| OLD | NEW |