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

Side by Side Diff: chrome/browser/search/search_android_unittest.cc

Issue 816403003: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 5 years, 12 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 | « chrome/browser/search/search.cc ('k') | chrome/browser/search/search_unittest.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/search/search.h" 5 #include "chrome/browser/search/search.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/statistics_recorder.h" 10 #include "base/metrics/statistics_recorder.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 TEST_F(SearchUtilTest, ShouldPrefetchSearchResults_DisabledViaFieldTrials) { 64 TEST_F(SearchUtilTest, ShouldPrefetchSearchResults_DisabledViaFieldTrials) {
65 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( 65 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
66 "EmbeddedSearch", 66 "EmbeddedSearch",
67 "Group1 espv:2 prefetch_results:0")); 67 "Group1 espv:2 prefetch_results:0"));
68 EXPECT_FALSE(ShouldPrefetchSearchResults()); 68 EXPECT_FALSE(ShouldPrefetchSearchResults());
69 EXPECT_EQ(2ul, EmbeddedSearchPageVersion()); 69 EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
70 } 70 }
71 71
72 TEST_F(SearchUtilTest, ShouldPrefetchSearchResults_EnabledViaCommandLine) { 72 TEST_F(SearchUtilTest, ShouldPrefetchSearchResults_EnabledViaCommandLine) {
73 CommandLine::ForCurrentProcess()->AppendSwitch( 73 base::CommandLine::ForCurrentProcess()->AppendSwitch(
74 switches::kPrefetchSearchResults); 74 switches::kPrefetchSearchResults);
75 // Command-line enable should override Finch. 75 // Command-line enable should override Finch.
76 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( 76 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
77 "EmbeddedSearch", "Group1 espv:2 prefetch_results:0")); 77 "EmbeddedSearch", "Group1 espv:2 prefetch_results:0"));
78 EXPECT_TRUE(ShouldPrefetchSearchResults()); 78 EXPECT_TRUE(ShouldPrefetchSearchResults());
79 EXPECT_EQ(2ul, EmbeddedSearchPageVersion()); 79 EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
80 } 80 }
81 81
82 TEST_F(SearchUtilTest, 82 TEST_F(SearchUtilTest,
83 ShouldReuseInstantSearchBasePage_PrefetchResultsFlagDisabled) { 83 ShouldReuseInstantSearchBasePage_PrefetchResultsFlagDisabled) {
(...skipping 17 matching lines...) Expand all
101 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial( 101 ASSERT_TRUE(base::FieldTrialList::CreateFieldTrial(
102 "EmbeddedSearch", 102 "EmbeddedSearch",
103 "Group1 espv:2 prefetch_results:1 reuse_instant_search_base_page:0")); 103 "Group1 espv:2 prefetch_results:1 reuse_instant_search_base_page:0"));
104 EXPECT_FALSE(ShouldReuseInstantSearchBasePage()); 104 EXPECT_FALSE(ShouldReuseInstantSearchBasePage());
105 EXPECT_EQ(2ul, EmbeddedSearchPageVersion()); 105 EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
106 } 106 }
107 107
108 } // namespace 108 } // namespace
109 109
110 } // namespace chrome 110 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/search/search_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698