Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: chrome/browser/autocomplete/search_provider_unittest.cc

Issue 1811123003: Omnibox Logging - Clear Both Counterfactual Bits on ResetSession() Call (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: update test Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | components/omnibox/browser/search_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | components/omnibox/browser/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698