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

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

Issue 8384002: Add test for Chrome install with existing Chrome Frame Multi-install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 1 month 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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"
11 #include "chrome/installer/util/util_constants.h" 11 #include "chrome/installer/util/util_constants.h"
12 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h" 12 #include "chrome/test/mini_installer_test/mini_installer_test_constants.h"
13 #include "chrome_mini_installer.h" 13 #include "chrome_mini_installer.h"
14 14
15 void BackUpProfile(bool chrome_frame) { 15 void BackUpProfile(bool chrome_frame) {
16 if (base::GetProcessCount(L"chrome.exe", NULL) > 0) { 16 if (base::GetProcessCount(L"chrome.exe", NULL) > 0) {
17 printf("Chrome is currently running and cannot backup the profile." 17 printf("Chrome is currently running and cannot backup the profile."
18 "Please close Chrome and run the tests again.\n"); 18 "Please close Chrome and run the tests again.\n");
19 exit(1); 19 exit(1);
20 } 20 }
21 ChromeMiniInstaller installer(false, chrome_frame, ""); 21 ChromeMiniInstaller installer(false, chrome_frame, "");
22 FilePath path; 22 FilePath path;
23 installer.GetChromeInstallDirectoryLocation(&path); 23 installer.GetInstallDirectory(&path);
24 path = path.Append(mini_installer_constants::kChromeAppDir).DirName(); 24 path = path.Append(mini_installer_constants::kChromeAppDir).DirName();
25 FilePath backup_path = path; 25 FilePath backup_path = path;
26 // Will hold User Data path that needs to be backed-up. 26 // Will hold User Data path that needs to be backed-up.
27 path = path.Append(mini_installer_constants::kChromeUserDataDir); 27 path = path.Append(mini_installer_constants::kChromeUserDataDir);
28 // Will hold new backup path to save the profile. 28 // Will hold new backup path to save the profile.
29 backup_path = backup_path.Append( 29 backup_path = backup_path.Append(
30 mini_installer_constants::kChromeUserDataBackupDir); 30 mini_installer_constants::kChromeUserDataBackupDir);
31 // Will check if User Data profile is available. 31 // Will check if User Data profile is available.
32 if (file_util::PathExists(path)) { 32 if (file_util::PathExists(path)) {
33 // Will check if User Data is already backed up. 33 // Will check if User Data is already backed up.
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 installer::switches::kChromeFrame)); 67 installer::switches::kChromeFrame));
68 } 68 }
69 69
70 if (base::win::GetVersion() < base::win::VERSION_VISTA || 70 if (base::win::GetVersion() < base::win::VERSION_VISTA ||
71 command_line.HasSwitch(switches::kInstallerTestForce)) { 71 command_line.HasSwitch(switches::kInstallerTestForce)) {
72 return test_suite.Run(); 72 return test_suite.Run();
73 } 73 }
74 printf("These tests don't run on this platform.\n"); 74 printf("These tests don't run on this platform.\n");
75 return 0; 75 return 0;
76 } 76 }
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