Roll src/third_party/WebKit 9f7fb92:f103b33 (svn 202621:202622)
[chromium-blink-merge.git] / components / search / search_android_unittest.cc
bloba778e7d214c0d856bfd7a122360c13911d6eaf9a
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
3 // found in the LICENSE file.
5 #include "components/search/search.h"
7 #include "base/command_line.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "base/metrics/field_trial.h"
10 #include "base/metrics/statistics_recorder.h"
11 #include "components/search/search.h"
12 #include "components/search/search_switches.h"
13 #include "components/variations/entropy_provider.h"
14 #include "testing/gtest/include/gtest/gtest.h"
16 namespace search {
18 namespace {
20 TEST(SearchTest, EmbeddedSearchAPIEnabled) {
21 EXPECT_EQ(1ul, EmbeddedSearchPageVersion());
22 EXPECT_FALSE(IsInstantExtendedAPIEnabled());
23 base::CommandLine::ForCurrentProcess()->AppendSwitch(
24 switches::kEnableEmbeddedSearchAPI);
25 EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
26 EXPECT_TRUE(IsInstantExtendedAPIEnabled());
29 TEST(SearchTest, QueryExtractionEnabled) {
30 // Query extraction is disabled on mobile.
31 EXPECT_FALSE(IsQueryExtractionEnabled());
34 } // namespace
36 } // namespace chrome