| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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/file_util.h" | 8 #include "base/file_util.h" |
| 9 #include "base/logging.h" | |
| 10 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 11 #include "base/registry.h" | 10 #include "base/registry.h" |
| 12 #include "base/scoped_ptr.h" | 11 #include "base/scoped_ptr.h" |
| 13 #include "base/string_util.h" | 12 #include "base/string_util.h" |
| 14 #include "chrome/installer/util/work_item.h" | 13 #include "chrome/installer/util/work_item.h" |
| 15 #include "chrome/installer/util/work_item_list.h" | 14 #include "chrome/installer/util/work_item_list.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 17 | 16 |
| 18 namespace { | 17 namespace { |
| 19 wchar_t test_root[] = L"ListList"; | 18 wchar_t test_root[] = L"ListList"; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 // The last one should not be there. | 146 // The last one should not be there. |
| 148 EXPECT_FALSE(key.Open(HKEY_CURRENT_USER, not_created_key.c_str(), | 147 EXPECT_FALSE(key.Open(HKEY_CURRENT_USER, not_created_key.c_str(), |
| 149 KEY_READ)); | 148 KEY_READ)); |
| 150 | 149 |
| 151 work_item_list->Rollback(); | 150 work_item_list->Rollback(); |
| 152 | 151 |
| 153 // Verify everything is rolled back. | 152 // Verify everything is rolled back. |
| 154 EXPECT_FALSE(key.Open(HKEY_CURRENT_USER, key_to_create.c_str(), KEY_READ)); | 153 EXPECT_FALSE(key.Open(HKEY_CURRENT_USER, key_to_create.c_str(), KEY_READ)); |
| 155 EXPECT_FALSE(file_util::PathExists(top_dir_to_create)); | 154 EXPECT_FALSE(file_util::PathExists(top_dir_to_create)); |
| 156 } | 155 } |
| OLD | NEW |