Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / sync / profile_signin_confirmation_helper_browsertest.cc
blob69e9dabd88418305e95c734be32986e997518f88
1 // Copyright 2013 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 "chrome/browser/ui/sync/profile_signin_confirmation_helper.h"
7 #include "base/bind.h"
8 #include "base/command_line.h"
9 #include "base/run_loop.h"
10 #include "chrome/browser/first_run/first_run.h"
11 #include "chrome/browser/ui/browser.h"
12 #include "chrome/common/chrome_switches.h"
13 #include "chrome/test/base/in_process_browser_test.h"
14 #include "content/public/test/test_launcher.h"
15 #include "testing/gtest/include/gtest/gtest.h"
17 class ProfileSigninConfirmationHelperBrowserTest : public InProcessBrowserTest {
18 public:
19 ProfileSigninConfirmationHelperBrowserTest() {}
21 void SetUpCommandLine(base::CommandLine* command_line) override {
22 // Force the first-run flow to trigger autoimport.
23 InProcessBrowserTest::SetUpCommandLine(command_line);
24 command_line->AppendSwitch(switches::kForceFirstRun);
27 private:
28 DISALLOW_COPY_AND_ASSIGN(ProfileSigninConfirmationHelperBrowserTest);
31 // http://crbug.com/321302
32 #if defined(GOOGLE_CHROME_BUILD) && (defined(OS_MACOSX) || defined(OS_LINUX))
33 #define MAYBE_HasNotBeenShutdown DISABLED_HasNotBeenShutdown
34 #else
35 #define MAYBE_HasNotBeenShutdown HasNotBeenShutdown
36 #endif
37 IN_PROC_BROWSER_TEST_F(ProfileSigninConfirmationHelperBrowserTest,
38 MAYBE_HasNotBeenShutdown) {
39 #if !defined(OS_CHROMEOS)
40 EXPECT_TRUE(first_run::auto_import_state() & first_run::AUTO_IMPORT_CALLED);
41 #endif
42 EXPECT_FALSE(ui::HasBeenShutdown(browser()->profile()));
45 // http://crbug.com/321302
46 #if defined(GOOGLE_CHROME_BUILD) && (defined(OS_MACOSX) || defined(OS_LINUX))
47 #define MAYBE_HasNoSyncedExtensions DISABLED_HasNoSyncedExtensions
48 #else
49 #define MAYBE_HasNoSyncedExtensions HasNoSyncedExtensions
50 #endif
51 IN_PROC_BROWSER_TEST_F(ProfileSigninConfirmationHelperBrowserTest,
52 MAYBE_HasNoSyncedExtensions) {
53 EXPECT_FALSE(ui::HasSyncedExtensions(browser()->profile()));