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

Side by Side Diff: components/search/search_android_unittest.cc

Issue 1921923002: Convert //components/[o-t]* from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
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 "components/search/search.h" 5 #include "components/search/search.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
10 #include "base/metrics/statistics_recorder.h" 9 #include "base/metrics/statistics_recorder.h"
11 #include "components/search/search.h" 10 #include "components/search/search.h"
12 #include "components/search/search_switches.h" 11 #include "components/search/search_switches.h"
13 #include "components/variations/entropy_provider.h" 12 #include "components/variations/entropy_provider.h"
14 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
15 14
16 namespace search { 15 namespace search {
17 16
18 namespace { 17 namespace {
19 18
20 TEST(SearchTest, EmbeddedSearchAPIEnabled) { 19 TEST(SearchTest, EmbeddedSearchAPIEnabled) {
21 EXPECT_EQ(1ul, EmbeddedSearchPageVersion()); 20 EXPECT_EQ(1ul, EmbeddedSearchPageVersion());
22 EXPECT_FALSE(IsInstantExtendedAPIEnabled()); 21 EXPECT_FALSE(IsInstantExtendedAPIEnabled());
23 base::CommandLine::ForCurrentProcess()->AppendSwitch( 22 base::CommandLine::ForCurrentProcess()->AppendSwitch(
24 switches::kEnableEmbeddedSearchAPI); 23 switches::kEnableEmbeddedSearchAPI);
25 EXPECT_EQ(2ul, EmbeddedSearchPageVersion()); 24 EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
26 EXPECT_TRUE(IsInstantExtendedAPIEnabled()); 25 EXPECT_TRUE(IsInstantExtendedAPIEnabled());
27 } 26 }
28 27
29 TEST(SearchTest, QueryExtractionEnabled) { 28 TEST(SearchTest, QueryExtractionEnabled) {
30 // Query extraction is disabled on mobile. 29 // Query extraction is disabled on mobile.
31 EXPECT_FALSE(IsQueryExtractionEnabled()); 30 EXPECT_FALSE(IsQueryExtractionEnabled());
32 } 31 }
33 32
34 } // namespace 33 } // namespace
35 34
36 } // namespace chrome 35 } // namespace chrome
OLDNEW
« no previous file with comments | « components/safe_json/testing_json_parser_unittest.cc ('k') | components/search/search_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698