| 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 <map> | 9 #include <map> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 base::win::RegKey key( | 118 base::win::RegKey key( |
| 119 HKEY_LOCAL_MACHINE, kHKLMAccessProviders, KEY_ALL_ACCESS); | 119 HKEY_LOCAL_MACHINE, kHKLMAccessProviders, KEY_ALL_ACCESS); |
| 120 WriteRegistryTree(data, &key); | 120 WriteRegistryTree(data, &key); |
| 121 } | 121 } |
| 122 } | 122 } |
| 123 | 123 |
| 124 } // namespace | 124 } // namespace |
| 125 | 125 |
| 126 #endif // defined(OS_WIN) | 126 #endif // defined(OS_WIN) |
| 127 | 127 |
| 128 void RlzLibTestNoMachineState::SetUp() { | 128 void RlzLibTestNoMachineStateHelper::SetUp() { |
| 129 #if defined(OS_WIN) | 129 #if defined(OS_WIN) |
| 130 InitializeRegistryOverridesForTesting(&override_manager_); | 130 InitializeRegistryOverridesForTesting(&override_manager_); |
| 131 #elif defined(OS_MACOSX) | 131 #elif defined(OS_MACOSX) |
| 132 base::mac::ScopedNSAutoreleasePool pool; | 132 base::mac::ScopedNSAutoreleasePool pool; |
| 133 #endif // defined(OS_WIN) | 133 #endif // defined(OS_WIN) |
| 134 #if defined(OS_POSIX) | 134 #if defined(OS_POSIX) |
| 135 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 135 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| 136 rlz_lib::testing::SetRlzStoreDirectory(temp_dir_.path()); | 136 rlz_lib::testing::SetRlzStoreDirectory(temp_dir_.path()); |
| 137 #endif // defined(OS_POSIX) | 137 #endif // defined(OS_POSIX) |
| 138 } | 138 } |
| 139 | 139 |
| 140 void RlzLibTestNoMachineState::TearDown() { | 140 void RlzLibTestNoMachineStateHelper::TearDown() { |
| 141 #if defined(OS_POSIX) | 141 #if defined(OS_POSIX) |
| 142 rlz_lib::testing::SetRlzStoreDirectory(base::FilePath()); | 142 rlz_lib::testing::SetRlzStoreDirectory(base::FilePath()); |
| 143 #endif // defined(OS_POSIX) | 143 #endif // defined(OS_POSIX) |
| 144 } | 144 } |
| 145 | 145 |
| 146 void RlzLibTestNoMachineState::SetUp() { |
| 147 m_rlz_test_helper_.SetUp(); |
| 148 } |
| 149 |
| 150 void RlzLibTestNoMachineState::TearDown() { |
| 151 m_rlz_test_helper_.TearDown(); |
| 152 } |
| 153 |
| 146 void RlzLibTestBase::SetUp() { | 154 void RlzLibTestBase::SetUp() { |
| 147 RlzLibTestNoMachineState::SetUp(); | 155 RlzLibTestNoMachineState::SetUp(); |
| 148 #if defined(OS_WIN) | 156 #if defined(OS_WIN) |
| 149 rlz_lib::CreateMachineState(); | 157 rlz_lib::CreateMachineState(); |
| 150 #endif // defined(OS_WIN) | 158 #endif // defined(OS_WIN) |
| 151 } | 159 } |
| OLD | NEW |