15821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Copyright (c) 2011 The Chromium Authors. All rights reserved. 25821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 35821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// found in the LICENSE file. 45821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 55821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// This file declares helper functions for use in tests that expect a valid 65821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// installation, possibly of a specific type. Validation violations result in 75821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// test failures. 85821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 95821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#ifndef CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATION_HELPER_H_ 105821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#define CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATION_HELPER_H_ 115821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 125821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#include "chrome/installer/util/installation_validator.h" 135821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 145821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)namespace installer { 155821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 165821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)class InstallationState; 175821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 185821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Evaluates the machine's current installation at level |system_level|. 195821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Returns the type of installation found. 205821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)InstallationValidator::InstallationType ExpectValidInstallation( 215821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) bool system_level); 225821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 235821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Evaluates |machine_state| at level |system_level|. Returns the type of 245821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// installation found. 255821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)InstallationValidator::InstallationType ExpectValidInstallationForState( 265821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const InstallationState& machine_state, 275821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) bool system_level); 285821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 295821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Evaluates the machine's current installation at level |system_level|, 305821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// expecting an installation of the given |type|. 315821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void ExpectInstallationOfType( 325821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) bool system_level, 335821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) InstallationValidator::InstallationType type); 345821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 355821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// Evaluates |machine_state| at level |system_level|, expecting an installation 365821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)// of the given |type|. 375821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)void ExpectInstallationOfTypeForState( 385821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) const InstallationState& machine_state, 395821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) bool system_level, 405821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) InstallationValidator::InstallationType type); 415821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 425821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)} // namespace installer 435821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles) 445821806d5e7f356e8fa4b058a389a808ea183019Torne (Richard Coles)#endif // CHROME_INSTALLER_UTIL_INSTALLATION_VALIDATION_HELPER_H_ 45