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

Unified Diff: chrome/browser/first_run/first_run_browsertest.cc

Issue 11572036: Do not load extension system in the Profile import process. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rollback to patchset 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/first_run/first_run_browsertest.cc
diff --git a/chrome/browser/first_run/first_run_browsertest.cc b/chrome/browser/first_run/first_run_browsertest.cc
index 40383b2eeca09d20f909c16be0bac8807e7c6bc9..50bd807652f4a7096eb028d67e22d92681928d00 100644
--- a/chrome/browser/first_run/first_run_browsertest.cc
+++ b/chrome/browser/first_run/first_run_browsertest.cc
@@ -2,11 +2,16 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include "base/command_line.h"
#include "chrome/browser/browser_process.h"
+#include "chrome/browser/extensions/component_loader.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/prefs/pref_service.h"
+#include "chrome/browser/profiles/profile_manager.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/in_process_browser_test.h"
+#include "content/public/test/test_launcher.h"
#include "testing/gtest/include/gtest/gtest.h"
typedef InProcessBrowserTest FirstRunBrowserTest;
@@ -37,3 +42,30 @@ IN_PROC_BROWSER_TEST_F(FirstRunBrowserTest, SetShowWelcomePagePref) {
EXPECT_TRUE(g_browser_process->local_state()->GetBoolean(
prefs::kShouldShowWelcomePage));
}
+
+namespace {
+class FirstRunIntegrationBrowserTest : public InProcessBrowserTest {
+ public:
+ FirstRunIntegrationBrowserTest() {}
+ protected:
+ virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
+ InProcessBrowserTest::SetUpCommandLine(command_line);
+ command_line->AppendSwitch(switches::kFirstRun);
+ command_line->AppendSwitch(switches::kFirstRunForceImport);
+ EXPECT_FALSE(ProfileManager::DidPerformProfileImport());
+
+ extensions::ComponentLoader::EnableBackgroundExtensionsForTesting();
+
+ // The forked import process should run BrowserMain.
+ CommandLine import_arguments((CommandLine::NoProgram()));
+ import_arguments.AppendSwitch(content::kLaunchAsBrowser);
+ first_run::SetExtraArgumentsForImportProcess(import_arguments);
+ }
+ private:
+ DISALLOW_COPY_AND_ASSIGN(FirstRunIntegrationBrowserTest);
+};
+}
+
+IN_PROC_BROWSER_TEST_F(FirstRunIntegrationBrowserTest, WaitForImport) {
+ ASSERT_TRUE(ProfileManager::DidPerformProfileImport());
+}
« no previous file with comments | « chrome/browser/first_run/first_run.cc ('k') | chrome/browser/first_run/first_run_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698