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

Side by Side Diff: chrome/browser/first_run/first_run_browsertest.cc

Issue 11636031: [Fixit Dec-2012] Refactor first_run, very few things should depend on whether the First Run senti... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge up to r174446 Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "chrome/browser/browser_process.h" 6 #include "chrome/browser/browser_process.h"
7 #include "chrome/browser/extensions/component_loader.h" 7 #include "chrome/browser/extensions/component_loader.h"
8 #include "chrome/browser/first_run/first_run.h" 8 #include "chrome/browser/first_run/first_run.h"
9 #include "chrome/browser/prefs/pref_service.h" 9 #include "chrome/browser/prefs/pref_service.h"
10 #include "chrome/browser/profiles/profile_manager.h" 10 #include "chrome/browser/profiles/profile_manager.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 } 60 }
61 61
62 namespace { 62 namespace {
63 class FirstRunIntegrationBrowserTest : public InProcessBrowserTest { 63 class FirstRunIntegrationBrowserTest : public InProcessBrowserTest {
64 public: 64 public:
65 FirstRunIntegrationBrowserTest() {} 65 FirstRunIntegrationBrowserTest() {}
66 protected: 66 protected:
67 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 67 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
68 InProcessBrowserTest::SetUpCommandLine(command_line); 68 InProcessBrowserTest::SetUpCommandLine(command_line);
69 command_line->AppendSwitch(switches::kFirstRun); 69 command_line->AppendSwitch(switches::kFirstRun);
70 command_line->AppendSwitch(switches::kFirstRunForceImport);
Nico 2012/12/21 21:44:22 Why is this no longer needed? The CL doesn't menti
gab 2012/12/21 22:10:35 This was just added in https://chromiumcodereview.
71 EXPECT_FALSE(ProfileManager::DidPerformProfileImport()); 70 EXPECT_FALSE(ProfileManager::DidPerformProfileImport());
72 71
73 extensions::ComponentLoader::EnableBackgroundExtensionsForTesting(); 72 extensions::ComponentLoader::EnableBackgroundExtensionsForTesting();
74 73
75 // The forked import process should run BrowserMain. 74 // The forked import process should run BrowserMain.
76 CommandLine import_arguments((CommandLine::NoProgram())); 75 CommandLine import_arguments((CommandLine::NoProgram()));
77 import_arguments.AppendSwitch(content::kLaunchAsBrowser); 76 import_arguments.AppendSwitch(content::kLaunchAsBrowser);
78 first_run::SetExtraArgumentsForImportProcess(import_arguments); 77 first_run::SetExtraArgumentsForImportProcess(import_arguments);
79 } 78 }
80 private: 79 private:
81 DISALLOW_COPY_AND_ASSIGN(FirstRunIntegrationBrowserTest); 80 DISALLOW_COPY_AND_ASSIGN(FirstRunIntegrationBrowserTest);
82 }; 81 };
83 } 82 }
84 83
85 IN_PROC_BROWSER_TEST_F(FirstRunIntegrationBrowserTest, WaitForImport) { 84 IN_PROC_BROWSER_TEST_F(FirstRunIntegrationBrowserTest, WaitForImport) {
86 ASSERT_TRUE(ProfileManager::DidPerformProfileImport()); 85 ASSERT_TRUE(ProfileManager::DidPerformProfileImport());
87 } 86 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698