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 #include <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include "base/base_paths.h" | 7 #include "base/base_paths.h" |
8 #include "base/files/file_util.h" | 8 #include "base/files/file_util.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace { | 22 namespace { |
23 | 23 |
24 const wchar_t kTestRoot[] = L"ListList"; | 24 const wchar_t kTestRoot[] = L"ListList"; |
25 const wchar_t kDataStr[] = L"data_111"; | 25 const wchar_t kDataStr[] = L"data_111"; |
26 const wchar_t kName[] = L"name"; | 26 const wchar_t kName[] = L"name"; |
27 | 27 |
28 class WorkItemListTest : public testing::Test { | 28 class WorkItemListTest : public testing::Test { |
29 protected: | 29 protected: |
30 virtual void SetUp() { | 30 virtual void SetUp() { |
31 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 31 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
32 registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER, L"root_pit"); | 32 registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); |
33 } | 33 } |
34 | 34 |
35 virtual void TearDown() { | 35 virtual void TearDown() { |
36 logging::CloseLogFile(); | 36 logging::CloseLogFile(); |
37 } | 37 } |
38 | 38 |
39 base::ScopedTempDir temp_dir_; | 39 base::ScopedTempDir temp_dir_; |
40 registry_util::RegistryOverrideManager registry_override_manager_; | 40 registry_util::RegistryOverrideManager registry_override_manager_; |
41 }; | 41 }; |
42 | 42 |
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 work_item_list->Rollback(); | 280 work_item_list->Rollback(); |
281 | 281 |
282 // Verify everything is rolled back. | 282 // Verify everything is rolled back. |
283 // The value must have been deleted first in roll back otherwise the key | 283 // The value must have been deleted first in roll back otherwise the key |
284 // can not be deleted. | 284 // can not be deleted. |
285 EXPECT_NE(ERROR_SUCCESS, | 285 EXPECT_NE(ERROR_SUCCESS, |
286 key.Open(HKEY_CURRENT_USER, key_to_create.c_str(), KEY_READ)); | 286 key.Open(HKEY_CURRENT_USER, key_to_create.c_str(), KEY_READ)); |
287 EXPECT_FALSE(base::PathExists(top_dir_to_create)); | 287 EXPECT_FALSE(base::PathExists(top_dir_to_create)); |
288 } | 288 } |
OLD | NEW |