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

Unified Diff: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc

Issue 12674028: Report text output and exit code for command-line operations. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Line endings. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
diff --git a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
index aec9cf578fb04ec1e8a86e18b653d7f10aa17b2a..b657349a300b57aa6aeea5243d09b1a0dd3d178f 100644
--- a/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
+++ b/chrome/browser/ui/startup/startup_browser_creator_browsertest.cc
@@ -11,6 +11,7 @@
#include "chrome/browser/extensions/extension_system.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/infobars/infobar_service.h"
+#include "chrome/browser/operation_output.h"
#include "chrome/browser/prefs/session_startup_pref.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_impl.h"
@@ -586,13 +587,13 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, StartupURLsForTwoProfiles) {
// Do a simple non-process-startup browser launch.
CommandLine dummy(CommandLine::NO_PROGRAM);
- int return_code;
StartupBrowserCreator browser_creator;
std::vector<Profile*> last_opened_profiles;
last_opened_profiles.push_back(default_profile);
last_opened_profiles.push_back(other_profile);
browser_creator.Start(dummy, profile_manager->user_data_dir(),
- default_profile, last_opened_profiles, &return_code);
+ default_profile, last_opened_profiles,
+ scoped_ptr<OperationOutput>());
// urls1 were opened in a browser for default_profile, and urls2 were opened
// in a browser for other_profile.
@@ -655,13 +656,12 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, UpdateWithTwoProfiles) {
// Simulate a launch after a browser update.
CommandLine dummy(CommandLine::NO_PROGRAM);
- int return_code;
StartupBrowserCreator browser_creator;
std::vector<Profile*> last_opened_profiles;
last_opened_profiles.push_back(profile1);
last_opened_profiles.push_back(profile2);
browser_creator.Start(dummy, profile_manager->user_data_dir(), profile1,
- last_opened_profiles, &return_code);
+ last_opened_profiles, scoped_ptr<OperationOutput>());
while (SessionRestore::IsRestoring(profile1) ||
SessionRestore::IsRestoring(profile2))
@@ -743,7 +743,6 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
// Do a simple non-process-startup browser launch.
CommandLine dummy(CommandLine::NO_PROGRAM);
- int return_code;
StartupBrowserCreator browser_creator;
std::vector<Profile*> last_opened_profiles;
last_opened_profiles.push_back(profile_home1);
@@ -751,7 +750,7 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest,
last_opened_profiles.push_back(profile_last);
last_opened_profiles.push_back(profile_urls);
browser_creator.Start(dummy, profile_manager->user_data_dir(), profile_home1,
- last_opened_profiles, &return_code);
+ last_opened_profiles, scoped_ptr<OperationOutput>());
while (SessionRestore::IsRestoring(default_profile) ||
SessionRestore::IsRestoring(profile_home1) ||
@@ -840,14 +839,13 @@ IN_PROC_BROWSER_TEST_F(StartupBrowserCreatorTest, ProfilesLaunchedAfterCrash) {
CommandLine dummy(CommandLine::NO_PROGRAM);
dummy.AppendSwitchASCII(switches::kTestType, "browser");
- int return_code;
StartupBrowserCreator browser_creator;
std::vector<Profile*> last_opened_profiles;
last_opened_profiles.push_back(profile_home);
last_opened_profiles.push_back(profile_last);
last_opened_profiles.push_back(profile_urls);
browser_creator.Start(dummy, profile_manager->user_data_dir(), profile_home,
- last_opened_profiles, &return_code);
+ last_opened_profiles, scoped_ptr<OperationOutput>());
// No profiles are getting restored, since they all display the crash info
// bar.

Powered by Google App Engine
This is Rietveld 408576698