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

Side by Side Diff: chrome/browser/extensions/api/search_engines_private/search_engines_private_apitest.cc

Issue 1096143003: Add chrome.searchEnginesPrivate API and Search Settings page. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update OWNERS Created 5 years, 7 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
(Empty)
1 // Copyright 2015 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.
4
5 #include "base/command_line.h"
6 #include "base/values.h"
7 #include "chrome/browser/extensions/extension_apitest.h"
8 #include "chrome/common/extensions/api/search_engines_private.h"
9 #include "components/keyed_service/core/keyed_service.h"
10 #include "content/public/test/test_utils.h"
11 #include "extensions/common/switches.h"
12
13 namespace extensions {
14
15 namespace {
16
17 class SearchEnginesPrivateApiTest : public ExtensionApiTest {
18 public:
19 SearchEnginesPrivateApiTest() {}
20 ~SearchEnginesPrivateApiTest() override {}
21
22 void SetUpCommandLine(base::CommandLine* command_line) override {
23 ExtensionApiTest::SetUpCommandLine(command_line);
24 }
25
26 void SetUpOnMainThread() override {
27 ExtensionApiTest::SetUpOnMainThread();
28 content::RunAllPendingInMessageLoop();
29 }
30
31 protected:
32 bool RunSearchEnginesSubtest(const std::string& subtest) {
33 return RunExtensionSubtest("search_engines_private",
34 "main.html?" + subtest,
35 kFlagLoadAsComponent);
36 }
37
38 private:
39 DISALLOW_COPY_AND_ASSIGN(SearchEnginesPrivateApiTest);
40 };
41
42 } // namespace
43
44 IN_PROC_BROWSER_TEST_F(SearchEnginesPrivateApiTest, SetSelectedSearchEngine) {
45 EXPECT_TRUE(RunSearchEnginesSubtest("setSelectedSearchEngine")) << message_;
46 }
47
48 IN_PROC_BROWSER_TEST_F(SearchEnginesPrivateApiTest,
49 OnDefaultSearchEnginesChanged) {
50 EXPECT_TRUE(RunSearchEnginesSubtest("onDefaultSearchEnginesChanged"))
51 << message_;
52 }
53
54 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698