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

Side by Side Diff: chrome/test/mini_installer_test/chrome_mini_installer.h

Issue 8037004: Adding simple Chrome install testing using multi-install and cleaning up a bit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ... Created 9 years, 2 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
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 #ifndef CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ 5 #ifndef CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_
6 #define CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ 6 #define CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 #include <string> 10 #include <string>
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/file_path.h" 13 #include "base/file_path.h"
14 #include "base/command_line.h" 14 #include "base/command_line.h"
15 15
16 // This class has methods to install and uninstall Chrome mini installer. 16 // This class has methods to install and uninstall Chrome mini installer.
17 class ChromeMiniInstaller { 17 class ChromeMiniInstaller {
18 public: 18 public:
19 ChromeMiniInstaller(const std::wstring& install_type, bool is_chrome_frame); 19 ChromeMiniInstaller(bool system_install, bool is_chrome_frame);
20 ~ChromeMiniInstaller() {} 20 ~ChromeMiniInstaller() {}
21 21
22 enum RepairChrome { 22 enum RepairChrome {
23 REGISTRY, 23 REGISTRY,
24 VERSION_FOLDER 24 VERSION_FOLDER
25 }; 25 };
26 26
27 // This method returns path to either program files 27 // This method returns path to either program files
28 // or documents and setting based on the install type. 28 // or documents and setting based on the install type.
29 std::wstring GetChromeInstallDirectoryLocation(); 29 bool GetChromeInstallDirectoryLocation(FilePath* path);
30 30
31 // Installs the latest full installer. 31 // Installs the latest full installer.
32 void InstallFullInstaller(bool over_install); 32 void InstallFullInstaller(bool over_install);
33 33
34 void InstallUsingMultiInstall();
35
34 // Installs chrome. 36 // Installs chrome.
35 void Install(); 37 void Install();
36 38
37 // This method will first install the full installer and 39 // This method will first install the full installer and
38 // then over installs with diff installer. If |should_start_ie| is true, 40 // then over installs with diff installer. If |should_start_ie| is true,
39 // start IE browser before launch installer, and leave the process running 41 // start IE browser before launch installer, and leave the process running
40 // through the installtions. 42 // through the installtions.
41 void OverInstallOnFullInstaller(const std::wstring& install_type, 43 void OverInstallOnFullInstaller(const std::wstring& install_type,
42 bool should_start_ie); 44 bool should_start_ie);
43 45
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 97
96 // Get HKEY based on install type. 98 // Get HKEY based on install type.
97 HKEY GetRootRegistryKey(); 99 HKEY GetRootRegistryKey();
98 100
99 // Returns Chrome pv registry key value. 101 // Returns Chrome pv registry key value.
100 bool GetChromeVersionFromRegistry(std::wstring* reg_key_value); 102 bool GetChromeVersionFromRegistry(std::wstring* reg_key_value);
101 103
102 // This method gets the shortcut path from start menu based on install type. 104 // This method gets the shortcut path from start menu based on install type.
103 FilePath GetStartMenuShortcutPath(); 105 FilePath GetStartMenuShortcutPath();
104 106
105 // Get path for uninstall.
106 std::wstring GetUninstallPath();
107
108 // Get user data directory path. 107 // Get user data directory path.
109 FilePath GetUserDataDirPath(); 108 FilePath GetUserDataDirPath();
110 109
111 // Gets the path to launch Chrome. 110 // Launch Chrome. Kill process if |kill| is true.
112 bool GetChromeLaunchPath(FilePath* launch_path); 111 void LaunchChrome(bool kill);
113
114 // This method will get Chrome.exe path and launch it.
115 void VerifyChromeLaunch(bool expected_status);
116 112
117 // This method verifies if Chrome/Chrome Frame installed correctly. 113 // This method verifies if Chrome/Chrome Frame installed correctly.
118 void VerifyInstall(bool over_install); 114 void VerifyInstall(bool over_install);
119 115
120 // This method verifies installation of Chrome/Chrome Frame via machine
121 // introspection.
122 void VerifyMachineState();
123
124 // This method will verify if ChromeFrame got successfully installed on the 116 // This method will verify if ChromeFrame got successfully installed on the
125 // machine. 117 // machine.
126 void VerifyChromeFrameInstall(); 118 void VerifyChromeFrameInstall();
127 119
128 // Launch IE with |navigate_url|. 120 // Launch IE with |navigate_url|.
129 void LaunchIE(const std::wstring& navigate_url); 121 void LaunchIE(const std::wstring& navigate_url);
130 122
131 // Launches the chrome installer and waits for it to end. 123 // Launch installer using provided |command|.
kkania 2011/09/28 18:02:43 Ideally this should be changed to RunInstaller, si
Huyen 2011/09/28 18:55:48 Done.
132 void LaunchInstaller(const FilePath& path, 124 void LaunchInstaller(const CommandLine& command);
133 const wchar_t* process_name);
134
135 // Verifies if Chrome launches after install.
136 void LaunchAndCloseChrome(bool over_install);
137
138 // Launches any requested browser.
139 void LaunchBrowser(const FilePath& path,
140 const std::wstring& args,
141 bool expected_status);
142 125
143 // Compares the registry key values after overinstall. 126 // Compares the registry key values after overinstall.
144 bool VerifyOverInstall(const std::wstring& reg_key_value_before_overinstall, 127 bool VerifyOverInstall(const std::wstring& reg_key_value_before_overinstall,
145 const std::wstring& reg_key_value_after_overinstall); 128 const std::wstring& reg_key_value_after_overinstall);
146 129
147 // This method will verify if the installed build is correct. 130 // This method will verify if the installed build is correct.
148 bool VerifyStandaloneInstall(); 131 bool VerifyStandaloneInstall();
149 132
150 // Get all the latest installers base on last modified date. 133 // Get all the latest installers base on last modified date.
151 bool LocateInstallers(const std::wstring& build); 134 bool LocateInstallers(const std::wstring& build);
152 135
153 // This method will create a command line to run apply tag. 136 // This method will create a command line to run apply tag.
154 CommandLine GetCommandForTagging(); 137 CommandLine GetCommandForTagging();
155 138
156 // This variable holds the install type. 139 // If true install system level. Otherwise install user level.
157 // Install type can be either system or user level. 140 bool system_install_;
158 std::wstring install_type_;
159 141
160 bool is_chrome_frame_; 142 bool is_chrome_frame_;
161 143
162 FilePath full_installer_; 144 FilePath full_installer_;
163 FilePath diff_installer_; 145 FilePath diff_installer_;
164 FilePath previous_installer_; 146 FilePath previous_installer_;
165 FilePath standalone_installer_; 147 FilePath standalone_installer_;
148 FilePath mini_installer_;
166 149
167 // Build numbers. 150 // Build numbers.
168 std::wstring current_build_, previous_build_; 151 std::wstring current_build_, previous_build_;
169 152
170 DISALLOW_COPY_AND_ASSIGN(ChromeMiniInstaller); 153 DISALLOW_COPY_AND_ASSIGN(ChromeMiniInstaller);
171 }; 154 };
172 155
173 #endif // CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_ 156 #endif // CHROME_TEST_MINI_INSTALLER_TEST_CHROME_MINI_INSTALLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698