Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / extensions / api / autofill_private / autofill_private_apitest.cc
blob9c09abea5201d4345a44afd89c9bfa8c1759a8c4
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.
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/autofill_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"
13 namespace extensions {
15 namespace {
17 class AutofillPrivateApiTest : public ExtensionApiTest {
18 public:
19 AutofillPrivateApiTest() {}
20 ~AutofillPrivateApiTest() override {}
22 void SetUpCommandLine(base::CommandLine* command_line) override {
23 ExtensionApiTest::SetUpCommandLine(command_line);
26 void SetUpOnMainThread() override {
27 ExtensionApiTest::SetUpOnMainThread();
28 content::RunAllPendingInMessageLoop();
31 protected:
32 bool RunAutofillSubtest(const std::string& subtest) {
33 return RunExtensionSubtest("autofill_private",
34 "main.html?" + subtest,
35 kFlagLoadAsComponent);
38 private:
39 DISALLOW_COPY_AND_ASSIGN(AutofillPrivateApiTest);
42 } // namespace
44 IN_PROC_BROWSER_TEST_F(AutofillPrivateApiTest, SaveAddress) {
45 EXPECT_TRUE(RunAutofillSubtest("saveAddress")) << message_;
48 IN_PROC_BROWSER_TEST_F(AutofillPrivateApiTest, GetAddressComponents) {
49 EXPECT_TRUE(RunAutofillSubtest("getAddressComponents")) << message_;
52 IN_PROC_BROWSER_TEST_F(AutofillPrivateApiTest, SaveCreditCard) {
53 EXPECT_TRUE(RunAutofillSubtest("saveCreditCard")) << message_;
56 IN_PROC_BROWSER_TEST_F(AutofillPrivateApiTest, RemoveEntry) {
57 EXPECT_TRUE(RunAutofillSubtest("removeEntry")) << message_;
60 IN_PROC_BROWSER_TEST_F(AutofillPrivateApiTest, ValidatePhoneNumbers) {
61 EXPECT_TRUE(RunAutofillSubtest("ValidatePhoneNumbers")) << message_;
64 } // namespace extensions