OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/test/test_suite.h" | 7 #include "base/test/test_suite.h" |
8 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" | 8 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" |
9 #include "chrome_mini_installer.h" | 9 #include "chrome_mini_installer.h" |
10 | 10 |
(...skipping 24 matching lines...) Expand all Loading... |
35 } else { | 35 } else { |
36 printf("Chrome is not installed. Will not take any backup\n"); | 36 printf("Chrome is not installed. Will not take any backup\n"); |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 int main(int argc, char** argv) { | 40 int main(int argc, char** argv) { |
41 // Check command line to decide if the tests should continue | 41 // Check command line to decide if the tests should continue |
42 // with cleaning the system or make a backup before continuing. | 42 // with cleaning the system or make a backup before continuing. |
43 CommandLine::Init(argc, argv); | 43 CommandLine::Init(argc, argv); |
44 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 44 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
45 if (command_line.HasSwitch(L"clean")) { | 45 if (command_line.HasSwitch("clean")) { |
46 printf("Current version of Chrome will be uninstalled " | 46 printf("Current version of Chrome will be uninstalled " |
47 "from all levels before proceeding with tests.\n"); | 47 "from all levels before proceeding with tests.\n"); |
48 } else if (command_line.HasSwitch(L"backup")) { | 48 } else if (command_line.HasSwitch("backup")) { |
49 BackUpProfile(); | 49 BackUpProfile(); |
50 } else { | 50 } else { |
51 printf("This test needs command line Arguments.\n"); | 51 printf("This test needs command line Arguments.\n"); |
52 printf("Usage: mini_installer_tests.exe -{clean|backup}\n"); | 52 printf("Usage: mini_installer_tests.exe -{clean|backup}\n"); |
53 printf("Note: -clean arg will uninstall your chrome at all levels" | 53 printf("Note: -clean arg will uninstall your chrome at all levels" |
54 " and also delete profile.\n" | 54 " and also delete profile.\n" |
55 "-backup arg will make a copy of User Data before uninstalling" | 55 "-backup arg will make a copy of User Data before uninstalling" |
56 " your chrome at all levels. The copy will be named as" | 56 " your chrome at all levels. The copy will be named as" |
57 " User Data Copy.\n"); | 57 " User Data Copy.\n"); |
58 exit(1); | 58 exit(1); |
59 } | 59 } |
60 return TestSuite(argc, argv).Run(); | 60 return TestSuite(argc, argv).Run(); |
61 } | 61 } |
OLD | NEW |