Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: chrome/installer/util/delete_reg_value_work_item_unittest.cc

Issue 2692843002: Fail tests fast if overriding the Windows registry fails. (Closed)
Patch Set: sync to position 450085 Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "chrome/installer/util/delete_reg_value_work_item.h" 5 #include "chrome/installer/util/delete_reg_value_work_item.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 10 matching lines...) Expand all
21 21
22 const wchar_t kTestKey[] = L"DeleteRegValueWorkItemTest"; 22 const wchar_t kTestKey[] = L"DeleteRegValueWorkItemTest";
23 const wchar_t kNameStr[] = L"name_str"; 23 const wchar_t kNameStr[] = L"name_str";
24 const wchar_t kNameDword[] = L"name_dword"; 24 const wchar_t kNameDword[] = L"name_dword";
25 25
26 class DeleteRegValueWorkItemTest : public testing::Test { 26 class DeleteRegValueWorkItemTest : public testing::Test {
27 protected: 27 protected:
28 DeleteRegValueWorkItemTest() {} 28 DeleteRegValueWorkItemTest() {}
29 29
30 void SetUp() override { 30 void SetUp() override {
31 registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER); 31 ASSERT_NO_FATAL_FAILURE(
32 registry_override_manager_.OverrideRegistry(HKEY_CURRENT_USER));
32 } 33 }
33 34
34 private: 35 private:
35 registry_util::RegistryOverrideManager registry_override_manager_; 36 registry_util::RegistryOverrideManager registry_override_manager_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(DeleteRegValueWorkItemTest); 38 DISALLOW_COPY_AND_ASSIGN(DeleteRegValueWorkItemTest);
38 }; 39 };
39 40
40 } // namespace 41 } // namespace
41 42
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 147
147 EXPECT_EQ(ERROR_FILE_NOT_FOUND, 148 EXPECT_EQ(ERROR_FILE_NOT_FOUND,
148 key.Open(HKEY_CURRENT_USER, kTestKey, KEY_READ)); 149 key.Open(HKEY_CURRENT_USER, kTestKey, KEY_READ));
149 150
150 work_item1->Rollback(); 151 work_item1->Rollback();
151 work_item2->Rollback(); 152 work_item2->Rollback();
152 153
153 EXPECT_EQ(ERROR_FILE_NOT_FOUND, 154 EXPECT_EQ(ERROR_FILE_NOT_FOUND,
154 key.Open(HKEY_CURRENT_USER, kTestKey, KEY_READ)); 155 key.Open(HKEY_CURRENT_USER, kTestKey, KEY_READ));
155 } 156 }
OLDNEW
« no previous file with comments | « chrome/installer/util/beacons_unittest.cc ('k') | chrome/installer/util/google_update_settings_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698