| OLD | NEW |
| 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 // This file declares helper functions for use in tests that expect a valid | 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 | 6 // installation, possibly of a specific type. Validation violations result in |
| 7 // test failures. | 7 // test failures. |
| 8 | 8 |
| 9 #include "chrome/installer/util/installation_validation_helper.h" | 9 #include "chrome/installer/util/installation_validation_helper.h" |
| 10 | 10 |
| 11 #include <stddef.h> |
| 12 |
| 11 #include "base/logging.h" | 13 #include "base/logging.h" |
| 12 #include "base/strings/string_piece.h" | 14 #include "base/strings/string_piece.h" |
| 13 #include "chrome/installer/util/installation_state.h" | 15 #include "chrome/installer/util/installation_state.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 15 | 17 |
| 16 namespace installer { | 18 namespace installer { |
| 17 | 19 |
| 18 namespace { | 20 namespace { |
| 19 | 21 |
| 20 // A helper class that installs a log message handler to add a test failure for | 22 // A helper class that installs a log message handler to add a test failure for |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 } | 129 } |
| 128 | 130 |
| 129 void ExpectInstallationOfTypeForState( | 131 void ExpectInstallationOfTypeForState( |
| 130 const InstallationState& machine_state, | 132 const InstallationState& machine_state, |
| 131 bool system_level, | 133 bool system_level, |
| 132 InstallationValidator::InstallationType type) { | 134 InstallationValidator::InstallationType type) { |
| 133 EXPECT_EQ(type, ExpectValidInstallationForState(machine_state, system_level)); | 135 EXPECT_EQ(type, ExpectValidInstallationForState(machine_state, system_level)); |
| 134 } | 136 } |
| 135 | 137 |
| 136 } // namespace installer | 138 } // namespace installer |
| OLD | NEW |