| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 // Main entry point for all unit tests. | 5 // Main entry point for all unit tests. |
| 6 | 6 |
| 7 #include "rlz_test_helpers.h" | 7 #include "rlz_test_helpers.h" |
| 8 | 8 |
| 9 #include <stddef.h> | 9 #include <stddef.h> |
| 10 #include <stdint.h> | 10 #include <stdint.h> |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #endif // defined(OS_WIN) | 130 #endif // defined(OS_WIN) |
| 131 | 131 |
| 132 void RlzLibTestNoMachineStateHelper::SetUp() { | 132 void RlzLibTestNoMachineStateHelper::SetUp() { |
| 133 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 134 InitializeRegistryOverridesForTesting(&override_manager_); | 134 InitializeRegistryOverridesForTesting(&override_manager_); |
| 135 #elif defined(OS_MACOSX) | 135 #elif defined(OS_MACOSX) |
| 136 base::mac::ScopedNSAutoreleasePool pool; | 136 base::mac::ScopedNSAutoreleasePool pool; |
| 137 #endif // defined(OS_WIN) | 137 #endif // defined(OS_WIN) |
| 138 #if defined(OS_POSIX) | 138 #if defined(OS_POSIX) |
| 139 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 139 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 140 rlz_lib::testing::SetRlzStoreDirectory(temp_dir_.path()); | 140 rlz_lib::testing::SetRlzStoreDirectory(temp_dir_.GetPath()); |
| 141 #endif // defined(OS_POSIX) | 141 #endif // defined(OS_POSIX) |
| 142 } | 142 } |
| 143 | 143 |
| 144 void RlzLibTestNoMachineStateHelper::TearDown() { | 144 void RlzLibTestNoMachineStateHelper::TearDown() { |
| 145 #if defined(OS_POSIX) | 145 #if defined(OS_POSIX) |
| 146 rlz_lib::testing::SetRlzStoreDirectory(base::FilePath()); | 146 rlz_lib::testing::SetRlzStoreDirectory(base::FilePath()); |
| 147 #endif // defined(OS_POSIX) | 147 #endif // defined(OS_POSIX) |
| 148 } | 148 } |
| 149 | 149 |
| 150 void RlzLibTestNoMachineState::SetUp() { | 150 void RlzLibTestNoMachineState::SetUp() { |
| 151 m_rlz_test_helper_.SetUp(); | 151 m_rlz_test_helper_.SetUp(); |
| 152 } | 152 } |
| 153 | 153 |
| 154 void RlzLibTestNoMachineState::TearDown() { | 154 void RlzLibTestNoMachineState::TearDown() { |
| 155 m_rlz_test_helper_.TearDown(); | 155 m_rlz_test_helper_.TearDown(); |
| 156 } | 156 } |
| 157 | 157 |
| 158 void RlzLibTestBase::SetUp() { | 158 void RlzLibTestBase::SetUp() { |
| 159 RlzLibTestNoMachineState::SetUp(); | 159 RlzLibTestNoMachineState::SetUp(); |
| 160 #if defined(OS_WIN) | 160 #if defined(OS_WIN) |
| 161 rlz_lib::CreateMachineState(); | 161 rlz_lib::CreateMachineState(); |
| 162 #endif // defined(OS_WIN) | 162 #endif // defined(OS_WIN) |
| 163 } | 163 } |
| OLD | NEW |