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

Side by Side Diff: chrome/installer/setup/update_active_setup_version_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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/setup/update_active_setup_version_work_item.h" 5 #include "chrome/installer/setup/update_active_setup_version_work_item.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 } // namespace 75 } // namespace
76 76
77 class UpdateActiveSetupVersionWorkItemTest 77 class UpdateActiveSetupVersionWorkItemTest
78 : public testing::TestWithParam<UpdateActiveSetupVersionWorkItemTestCase> { 78 : public testing::TestWithParam<UpdateActiveSetupVersionWorkItemTestCase> {
79 public: 79 public:
80 UpdateActiveSetupVersionWorkItemTest() {} 80 UpdateActiveSetupVersionWorkItemTest() {}
81 81
82 void SetUp() override { 82 void SetUp() override {
83 registry_override_manager_.OverrideRegistry(kActiveSetupRoot); 83 ASSERT_NO_FATAL_FAILURE(
84 registry_override_manager_.OverrideRegistry(kActiveSetupRoot));
84 } 85 }
85 86
86 private: 87 private:
87 registry_util::RegistryOverrideManager registry_override_manager_; 88 registry_util::RegistryOverrideManager registry_override_manager_;
88 89
89 DISALLOW_COPY_AND_ASSIGN(UpdateActiveSetupVersionWorkItemTest); 90 DISALLOW_COPY_AND_ASSIGN(UpdateActiveSetupVersionWorkItemTest);
90 }; 91 };
91 92
92 TEST_P(UpdateActiveSetupVersionWorkItemTest, Execute) { 93 TEST_P(UpdateActiveSetupVersionWorkItemTest, Execute) {
93 // Get the parametrized |test_case| which defines 5 steps: 94 // Get the parametrized |test_case| which defines 5 steps:
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 EXPECT_EQ(test_case.initial_value, version_out); 145 EXPECT_EQ(test_case.initial_value, version_out);
145 } else { 146 } else {
146 EXPECT_EQ(ERROR_FILE_NOT_FOUND, read_result); 147 EXPECT_EQ(ERROR_FILE_NOT_FOUND, read_result);
147 } 148 }
148 } 149 }
149 } 150 }
150 151
151 INSTANTIATE_TEST_CASE_P(UpdateActiveSetupVersionWorkItemTestInstance, 152 INSTANTIATE_TEST_CASE_P(UpdateActiveSetupVersionWorkItemTestInstance,
152 UpdateActiveSetupVersionWorkItemTest, 153 UpdateActiveSetupVersionWorkItemTest,
153 ValuesIn(kUpdateActiveSetupVersionWorkItemTestCases)); 154 ValuesIn(kUpdateActiveSetupVersionWorkItemTestCases));
OLDNEW
« no previous file with comments | « chrome/installer/setup/setup_util_unittest.cc ('k') | chrome/installer/util/beacons_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698