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

Unified Diff: chrome/browser/search/search_android_unittest.cc

Issue 215733002: Add support to enable EmbeddedSearch API in Android Chrome search results page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/search/search_android_unittest.cc
diff --git a/chrome/browser/search/search_android_unittest.cc b/chrome/browser/search/search_android_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dcf591450e9a0a8b7c56f2a320a8013b5e60751d
--- /dev/null
+++ b/chrome/browser/search/search_android_unittest.cc
@@ -0,0 +1,26 @@
+// Copyright 2014 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/browser/search/search.h"
+
+#include "base/command_line.h"
+#include "chrome/common/chrome_switches.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+namespace chrome {
+
+namespace {
+
+TEST(SearchTest, EmbeddedSearchAPIEnabled) {
+ EXPECT_EQ(1ul, EmbeddedSearchPageVersion());
+ EXPECT_FALSE(IsInstantExtendedAPIEnabled());
+ CommandLine::ForCurrentProcess()->AppendSwitch(
+ switches::kEnableEmbeddedSearchAPI);
+ EXPECT_EQ(2ul, EmbeddedSearchPageVersion());
+ EXPECT_TRUE(IsInstantExtendedAPIEnabled());
+}
+
+} // namespace
+
+} // namespace chrome
« no previous file with comments | « chrome/browser/search/search.cc ('k') | chrome/browser/ui/search/search_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698