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

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

Issue 301223007: Delete old mini_installer_test. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_TEST_UTIL_H_
6 #define CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_TEST_UTIL_H_
7
8 #include <vector>
9
10 #include "base/command_line.h"
11 #include "base/files/file_path.h"
12 #include "chrome/installer/util/installation_validator.h"
13 #include "chrome/test/mini_installer_test/switch_builder.h"
14
15 namespace installer_test {
16
17 struct InstalledProduct {
18 std::string version;
19 installer::InstallationValidator::InstallationType type;
20 bool system;
21 };
22
23 // Utility functions used to test Chrome installation.
24
25 // Deletes the Chrome installation directory which is found at different
26 // locations depending on the |system_level| and |type|.
27 // Returns true if successful, otherwise false.
28 bool DeleteInstallDirectory(
29 bool system_level,
30 installer::InstallationValidator::InstallationType type);
31
32 // Deletes the Chrome Windows registry entry.
33 // Returns true if successful, otherwise false.
34 bool DeleteRegistryKey(
35 bool system_level,
36 installer::InstallationValidator::InstallationType type,
37 REGSAM wow64_access);
38
39 // Locates the Chrome installation directory based on the
40 // provided |system_level|. Returns true if successful, otherwise false.
41 // Returns true if successful, otherwise false.
42 bool GetChromeInstallDirectory(bool system_level, base::FilePath* path);
43
44 // Gets the installation directory of either Chrome or Chrome Frame
45 // as specified by the |system_level| and |type|.
46 // Returns true if successful, otherwise false.
47 bool GetInstallDirectory(bool system_level,
48 BrowserDistribution::Type type, base::FilePath* path);
49
50 // Returns the version of the specified |product|.
51 std::string GetVersion(
52 installer::InstallationValidator::InstallationType product);
53
54 // Gets a list of installed products.
55 // Returns true if there are installed products.
56 bool GetInstalledProducts(std::vector<InstalledProduct>* products);
57
58 bool Install(const base::FilePath& installer);
59 bool Install(const base::FilePath& installer, const SwitchBuilder& switches);
60 bool LaunchChrome(bool close_after_launch, bool system_level);
61 bool LaunchIE(const std::string& url);
62
63 // Uninstall all Chrome or Chrome Frame installations.
64 bool UninstallAll();
65
66 // Uninstall the product specified by |system_level| and |type|.
67 bool Uninstall(
68 bool system_level,
69 installer::InstallationValidator::InstallationType type);
70
71 // Uninstall the product specified by |system_level| and |product|.
72 bool Uninstall(
73 bool system_level,
74 BrowserDistribution::Type product);
75
76 bool ValidateInstall(
77 bool system_level,
78 installer::InstallationValidator::InstallationType expected,
79 const std::string& version);
80
81 // Run and wait for command to finish.
82 // Returns true if successful, otherwise false.
83 bool RunAndWaitForCommandToFinish(base::CommandLine command);
84
85 } // namespace installer_test
86
87 #endif // CHROME_TEST_MINI_INSTALLER_TEST_INSTALLER_TEST_UTIL_H_
88
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698