| 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 "components/omnibox/browser/autocomplete_provider.h" | 5 #include "components/omnibox/browser/autocomplete_provider.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 // exactly once. | 281 // exactly once. |
| 282 bool client_owned_; | 282 bool client_owned_; |
| 283 | 283 |
| 284 DISALLOW_COPY_AND_ASSIGN(AutocompleteProviderTest); | 284 DISALLOW_COPY_AND_ASSIGN(AutocompleteProviderTest); |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 AutocompleteProviderTest::AutocompleteProviderTest() | 287 AutocompleteProviderTest::AutocompleteProviderTest() |
| 288 : client_(new AutocompleteProviderClientWithClosure()), | 288 : client_(new AutocompleteProviderClientWithClosure()), |
| 289 client_owned_(false) { | 289 client_owned_(false) { |
| 290 client_->set_template_url_service( | 290 client_->set_template_url_service( |
| 291 base::WrapUnique(new TemplateURLService(nullptr, 0))); | 291 base::MakeUnique<TemplateURLService>(nullptr, 0)); |
| 292 } | 292 } |
| 293 | 293 |
| 294 AutocompleteProviderTest::~AutocompleteProviderTest() { | 294 AutocompleteProviderTest::~AutocompleteProviderTest() { |
| 295 EXPECT_TRUE(client_owned_); | 295 EXPECT_TRUE(client_owned_); |
| 296 } | 296 } |
| 297 | 297 |
| 298 void AutocompleteProviderTest::RegisterTemplateURL( | 298 void AutocompleteProviderTest::RegisterTemplateURL( |
| 299 const base::string16 keyword, | 299 const base::string16 keyword, |
| 300 const std::string& template_url) { | 300 const std::string& template_url) { |
| 301 TemplateURLData data; | 301 TemplateURLData data; |
| (...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 766 EXPECT_FALSE(search_provider_field_trial_triggered_in_session()); | 766 EXPECT_FALSE(search_provider_field_trial_triggered_in_session()); |
| 767 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); | 767 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); |
| 768 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j0j4&", url.path()); | 768 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j0j4&", url.path()); |
| 769 | 769 |
| 770 // Test page classification and field trial triggered set. | 770 // Test page classification and field trial triggered set. |
| 771 set_search_provider_field_trial_triggered_in_session(true); | 771 set_search_provider_field_trial_triggered_in_session(true); |
| 772 EXPECT_TRUE(search_provider_field_trial_triggered_in_session()); | 772 EXPECT_TRUE(search_provider_field_trial_triggered_in_session()); |
| 773 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); | 773 url = GetDestinationURL(match, base::TimeDelta::FromMilliseconds(2456)); |
| 774 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j1j4&", url.path()); | 774 EXPECT_EQ("//aqs=chrome.0.69i57j69i58j5l2j0l3j69i59.2456j1j4&", url.path()); |
| 775 } | 775 } |
| OLD | NEW |