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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc

Issue 20743002: Do not CreateSentinel until after the process singleton has been grabbed by the current process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge latest version of https://codereview.chromium.org/20483002/ Created 7 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/gtk/first_run_dialog.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 other_browser = *it; 83 other_browser = *it;
84 } 84 }
85 return other_browser; 85 return other_browser;
86 } 86 }
87 87
88 } // namespace 88 } // namespace
89 89
90 class StartupBrowserCreatorTest : public ExtensionBrowserTest { 90 class StartupBrowserCreatorTest : public ExtensionBrowserTest {
91 protected: 91 protected:
92 virtual bool SetUpUserDataDirectory() OVERRIDE { 92 virtual bool SetUpUserDataDirectory() OVERRIDE {
93 // Make sure the first run sentinel file exists before running these tests,
94 // since some of them customize the session startup pref whose value can
95 // be different than the default during the first run.
96 // TODO(bauerb): set the first run flag instead of creating a sentinel file.
97 first_run::CreateSentinel();
98 return ExtensionBrowserTest::SetUpUserDataDirectory(); 93 return ExtensionBrowserTest::SetUpUserDataDirectory();
99 } 94 }
100 95
101 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE { 96 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
102 ExtensionBrowserTest::SetUpCommandLine(command_line); 97 ExtensionBrowserTest::SetUpCommandLine(command_line);
103 command_line->AppendSwitch(switches::kEnablePanels); 98 command_line->AppendSwitch(switches::kEnablePanels);
104 command_line->AppendSwitchASCII(switches::kHomePage, 99 command_line->AppendSwitchASCII(switches::kHomePage,
105 content::kAboutBlankURL); 100 content::kAboutBlankURL);
106 #if defined(OS_CHROMEOS) 101 #if defined(OS_CHROMEOS)
107 // TODO(nkostylev): Investigate if we can remove this switch. 102 // TODO(nkostylev): Investigate if we can remove this switch.
(...skipping 1269 matching lines...) Expand 10 before | Expand all | Expand 10 after
1377 ASSERT_EQ(1, tab_strip->count()); 1372 ASSERT_EQ(1, tab_strip->count());
1378 EXPECT_EQ("title1.html", 1373 EXPECT_EQ("title1.html",
1379 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName()); 1374 tab_strip->GetWebContentsAt(0)->GetURL().ExtractFileName());
1380 } 1375 }
1381 #endif // defined(ENABLE_CONFIGURATION_POLICY) 1376 #endif // defined(ENABLE_CONFIGURATION_POLICY)
1382 1377
1383 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) || 1378 #endif // !defined(OS_LINUX) || !defined(GOOGLE_CHROME_BUILD) ||
1384 // defined(ENABLE_CONFIGURATION_POLICY) 1379 // defined(ENABLE_CONFIGURATION_POLICY)
1385 1380
1386 #endif // !defined(OS_CHROMEOS) 1381 #endif // !defined(OS_CHROMEOS)
OLDNEW
« no previous file with comments | « chrome/browser/ui/gtk/first_run_dialog.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698