- add sources.
[platform/framework/web/crosswalk.git] / src / chrome / installer / util / installation_validation_helper.h
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
3 // found in the LICENSE file.
4
5 // This file declares helper functions for use in tests that expect a valid
6 // installation, possibly of a specific type.  Validation violations result in
7 // test failures.
8
9 #ifndef CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATION_HELPER_H_
10 #define CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATION_HELPER_H_
11
12 #include "chrome/installer/util/installation_validator.h"
13
14 namespace installer {
15
16 class InstallationState;
17
18 // Evaluates the machine's current installation at level |system_level|.
19 // Returns the type of installation found.
20 InstallationValidator::InstallationType ExpectValidInstallation(
21     bool system_level);
22
23 // Evaluates |machine_state| at level |system_level|.  Returns the type of
24 // installation found.
25 InstallationValidator::InstallationType ExpectValidInstallationForState(
26     const InstallationState& machine_state,
27     bool system_level);
28
29 // Evaluates the machine's current installation at level |system_level|,
30 // expecting an installation of the given |type|.
31 void ExpectInstallationOfType(
32     bool system_level,
33     InstallationValidator::InstallationType type);
34
35 // Evaluates |machine_state| at level |system_level|, expecting an installation
36 // of the given |type|.
37 void ExpectInstallationOfTypeForState(
38     const InstallationState& machine_state,
39     bool system_level,
40     InstallationValidator::InstallationType type);
41
42 }  // namespace installer
43
44 #endif  // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATION_HELPER_H_