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

Side by Side Diff: chrome/test/mini_installer_test/run_all_unittests.cc

Issue 5738009: Revert 69167, itself a revert of 69165 - Merge the installer, installer_util ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "base/file_util.h" 6 #include "base/file_util.h"
7 #include "base/process_util.h" 7 #include "base/process_util.h"
8 #include "base/test/test_suite.h" 8 #include "base/test/test_suite.h"
9 #include "base/win/windows_version.h" 9 #include "base/win/windows_version.h"
10 #include "chrome/common/chrome_switches.h" 10 #include "chrome/common/chrome_switches.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // Check command line to decide if the tests should continue 45 // Check command line to decide if the tests should continue
46 // with cleaning the system or make a backup before continuing. 46 // with cleaning the system or make a backup before continuing.
47 CommandLine::Init(argc, argv); 47 CommandLine::Init(argc, argv);
48 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 48 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
49 base::TestSuite test_suite(argc, argv); 49 base::TestSuite test_suite(argc, argv);
50 if (command_line.HasSwitch(switches::kInstallerTestClean)) { 50 if (command_line.HasSwitch(switches::kInstallerTestClean)) {
51 printf("Current version of Chrome will be uninstalled " 51 printf("Current version of Chrome will be uninstalled "
52 "from all levels before proceeding with tests.\n"); 52 "from all levels before proceeding with tests.\n");
53 } else if (command_line.HasSwitch(switches::kInstallerTestBackup)) { 53 } else if (command_line.HasSwitch(switches::kInstallerTestBackup)) {
54 BackUpProfile(command_line.HasSwitch( 54 BackUpProfile(command_line.HasSwitch(
55 installer_util::switches::kChromeFrame)); 55 installer::switches::kChromeFrame));
56 } else { 56 } else {
57 printf("This test needs command line arguments.\n"); 57 printf("This test needs command line arguments.\n");
58 printf("Usage: %ls -{clean|backup} [-build <version>] [-force] \n", 58 printf("Usage: %ls -{clean|backup} [-build <version>] [-force] \n",
59 command_line.GetProgram().value().c_str()); 59 command_line.GetProgram().value().c_str());
60 printf("-clean arg will uninstall your chrome at all levels" 60 printf("-clean arg will uninstall your chrome at all levels"
61 " and also delete profile.\n" 61 " and also delete profile.\n"
62 "-backup arg will make a copy of User Data before uninstalling" 62 "-backup arg will make a copy of User Data before uninstalling"
63 " your chrome at all levels. The copy will be named as" 63 " your chrome at all levels. The copy will be named as"
64 " User Data Copy.\n" 64 " User Data Copy.\n"
65 "-build specifies the build to be tested, e.g., 3.0.195.24." 65 "-build specifies the build to be tested, e.g., 3.0.195.24."
66 " Specifying 'dev' or 'stable' will use the latest build from that" 66 " Specifying 'dev' or 'stable' will use the latest build from that"
67 " channel. 'latest', the default, will use the latest build.\n" 67 " channel. 'latest', the default, will use the latest build.\n"
68 "-force allows these tests to be run on the current platform," 68 "-force allows these tests to be run on the current platform,"
69 " regardless of whether it is supported.\n"); 69 " regardless of whether it is supported.\n");
70 return 1; 70 return 1;
71 } 71 }
72 72
73 if (base::win::GetVersion() < base::win::VERSION_VISTA || 73 if (base::win::GetVersion() < base::win::VERSION_VISTA ||
74 command_line.HasSwitch(switches::kInstallerTestForce)) { 74 command_line.HasSwitch(switches::kInstallerTestForce)) {
75 return test_suite.Run(); 75 return test_suite.Run();
76 } else { 76 } else {
77 printf("These tests don't run on this platform.\n"); 77 printf("These tests don't run on this platform.\n");
78 return 0; 78 return 0;
79 } 79 }
80 } 80 }
OLDNEW
« no previous file with comments | « chrome/test/mini_installer_test/chrome_mini_installer.cc ('k') | chrome/test/mini_installer_test/test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698