| 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_url_provider.h" | 5 #include "chrome/browser/autocomplete/history_url_provider.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 140 } | 140 } |
| 141 | 141 |
| 142 virtual ~HistoryURLProviderTest() { | 142 virtual ~HistoryURLProviderTest() { |
| 143 HistoryQuickProvider::set_disabled(false); | 143 HistoryQuickProvider::set_disabled(false); |
| 144 } | 144 } |
| 145 | 145 |
| 146 // AutocompleteProviderListener: | 146 // AutocompleteProviderListener: |
| 147 virtual void OnProviderUpdate(bool updated_matches) OVERRIDE; | 147 virtual void OnProviderUpdate(bool updated_matches) OVERRIDE; |
| 148 | 148 |
| 149 protected: | 149 protected: |
| 150 static ProfileKeyedService* CreateTemplateURLService( | 150 static BrowserContextKeyedService* CreateTemplateURLService( |
| 151 content::BrowserContext* profile) { | 151 content::BrowserContext* profile) { |
| 152 return new TemplateURLService(static_cast<Profile*>(profile)); | 152 return new TemplateURLService(static_cast<Profile*>(profile)); |
| 153 } | 153 } |
| 154 | 154 |
| 155 // testing::Test | 155 // testing::Test |
| 156 virtual void SetUp() { | 156 virtual void SetUp() { |
| 157 SetUpImpl(false); | 157 SetUpImpl(false); |
| 158 } | 158 } |
| 159 virtual void TearDown(); | 159 virtual void TearDown(); |
| 160 | 160 |
| (...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 RunTest(ASCIIToUTF16("foobar"), string16(), true, | 784 RunTest(ASCIIToUTF16("foobar"), string16(), true, |
| 785 expected_when_searching_query, arraysize(expected_when_searching_query)); | 785 expected_when_searching_query, arraysize(expected_when_searching_query)); |
| 786 | 786 |
| 787 // We should not see search URLs when typing the search engine name. | 787 // We should not see search URLs when typing the search engine name. |
| 788 const std::string expected_when_searching_site[] = { | 788 const std::string expected_when_searching_site[] = { |
| 789 test_cases[0].url | 789 test_cases[0].url |
| 790 }; | 790 }; |
| 791 RunTest(ASCIIToUTF16("testsearch"), string16(), true, | 791 RunTest(ASCIIToUTF16("testsearch"), string16(), true, |
| 792 expected_when_searching_site, arraysize(expected_when_searching_site)); | 792 expected_when_searching_site, arraysize(expected_when_searching_site)); |
| 793 } | 793 } |
| OLD | NEW |