| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/search_provider.h" | 5 #include "components/omnibox/browser/search_provider.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 2557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2568 ASSERT_EQ(1U, providers_info.size()); | 2568 ASSERT_EQ(1U, providers_info.size()); |
| 2569 EXPECT_EQ(1, providers_info[0].field_trial_triggered_size()); | 2569 EXPECT_EQ(1, providers_info[0].field_trial_triggered_size()); |
| 2570 EXPECT_EQ(1, providers_info[0].field_trial_triggered_in_session_size()); | 2570 EXPECT_EQ(1, providers_info[0].field_trial_triggered_in_session_size()); |
| 2571 } | 2571 } |
| 2572 { | 2572 { |
| 2573 // Reset the session and check that bits are reset. | 2573 // Reset the session and check that bits are reset. |
| 2574 provider_->ResetSession(); | 2574 provider_->ResetSession(); |
| 2575 ProvidersInfo providers_info; | 2575 ProvidersInfo providers_info; |
| 2576 provider_->AddProviderInfo(&providers_info); | 2576 provider_->AddProviderInfo(&providers_info); |
| 2577 ASSERT_EQ(1U, providers_info.size()); | 2577 ASSERT_EQ(1U, providers_info.size()); |
| 2578 EXPECT_EQ(1, providers_info[0].field_trial_triggered_size()); | 2578 EXPECT_EQ(0, providers_info[0].field_trial_triggered_size()); |
| 2579 EXPECT_EQ(0, providers_info[0].field_trial_triggered_in_session_size()); | 2579 EXPECT_EQ(0, providers_info[0].field_trial_triggered_in_session_size()); |
| 2580 } | 2580 } |
| 2581 } | 2581 } |
| 2582 | 2582 |
| 2583 // Verifies inline autocompletion of navigational results. | 2583 // Verifies inline autocompletion of navigational results. |
| 2584 TEST_F(SearchProviderTest, NavigationInline) { | 2584 TEST_F(SearchProviderTest, NavigationInline) { |
| 2585 struct { | 2585 struct { |
| 2586 const std::string input; | 2586 const std::string input; |
| 2587 const std::string url; | 2587 const std::string url; |
| 2588 // Test the expected fill_into_edit, which may drop "http://". | 2588 // Test the expected fill_into_edit, which may drop "http://". |
| (...skipping 1009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3598 } | 3598 } |
| 3599 | 3599 |
| 3600 TEST_F(SearchProviderTest, DoesNotProvideOnFocus) { | 3600 TEST_F(SearchProviderTest, DoesNotProvideOnFocus) { |
| 3601 AutocompleteInput input( | 3601 AutocompleteInput input( |
| 3602 base::ASCIIToUTF16("f"), base::string16::npos, std::string(), GURL(), | 3602 base::ASCIIToUTF16("f"), base::string16::npos, std::string(), GURL(), |
| 3603 metrics::OmniboxEventProto::INVALID_SPEC, false, true, true, true, true, | 3603 metrics::OmniboxEventProto::INVALID_SPEC, false, true, true, true, true, |
| 3604 ChromeAutocompleteSchemeClassifier(&profile_)); | 3604 ChromeAutocompleteSchemeClassifier(&profile_)); |
| 3605 provider_->Start(input, false); | 3605 provider_->Start(input, false); |
| 3606 EXPECT_TRUE(provider_->matches().empty()); | 3606 EXPECT_TRUE(provider_->matches().empty()); |
| 3607 } | 3607 } |
| OLD | NEW |