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" |
11 #include "base/path_service.h" | |
12 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
13 #include "base/test/test_reg_util_win.h" | 12 #include "base/test/test_reg_util_win.h" |
14 #include "base/win/registry.h" | 13 #include "base/win/registry.h" |
15 #include "chrome/installer/util/conditional_work_item_list.h" | 14 #include "chrome/installer/util/conditional_work_item_list.h" |
16 #include "chrome/installer/util/work_item.h" | 15 #include "chrome/installer/util/work_item.h" |
17 #include "chrome/installer/util/work_item_list.h" | 16 #include "chrome/installer/util/work_item_list.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
19 | 18 |
20 using base::win::RegKey; | 19 using base::win::RegKey; |
21 | 20 |
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 278 |
280 work_item_list->Rollback(); | 279 work_item_list->Rollback(); |
281 | 280 |
282 // Verify everything is rolled back. | 281 // Verify everything is rolled back. |
283 // The value must have been deleted first in roll back otherwise the key | 282 // The value must have been deleted first in roll back otherwise the key |
284 // can not be deleted. | 283 // can not be deleted. |
285 EXPECT_NE(ERROR_SUCCESS, | 284 EXPECT_NE(ERROR_SUCCESS, |
286 key.Open(HKEY_CURRENT_USER, key_to_create.c_str(), KEY_READ)); | 285 key.Open(HKEY_CURRENT_USER, key_to_create.c_str(), KEY_READ)); |
287 EXPECT_FALSE(base::PathExists(top_dir_to_create)); | 286 EXPECT_FALSE(base::PathExists(top_dir_to_create)); |
288 } | 287 } |
OLD | NEW |