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

Unified Diff: chrome/install_static/install_util_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 side-by-side diff with in-line comments
Download patch
Index: chrome/install_static/install_util_unittest.cc
diff --git a/chrome/install_static/install_util_unittest.cc b/chrome/install_static/install_util_unittest.cc
index de378b28c792ca78f1662152c65d39069627496c..0f85d6507833364bd80f25cee0644def83d3add6 100644
--- a/chrome/install_static/install_util_unittest.cc
+++ b/chrome/install_static/install_util_unittest.cc
@@ -273,20 +273,20 @@ class InstallStaticUtilTest
scoped_install_details_(system_level_, std::get<0>(GetParam())),
mode_(&InstallDetails::Get().mode()),
root_key_(system_level_ ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER),
- nt_root_key_(system_level_ ? nt::HKLM : nt::HKCU) {
+ nt_root_key_(system_level_ ? nt::HKLM : nt::HKCU) {}
+
+ void SetUp() override {
+ ASSERT_TRUE(!system_level_ || mode_->supports_system_level);
base::string16 path;
- override_manager_.OverrideRegistry(root_key_, &path);
+ ASSERT_NO_FATAL_FAILURE(
+ override_manager_.OverrideRegistry(root_key_, &path));
nt::SetTestingOverride(nt_root_key_, path);
}
- ~InstallStaticUtilTest() {
+ void TearDown() override {
nt::SetTestingOverride(nt_root_key_, base::string16());
}
- void SetUp() override {
- ASSERT_TRUE(!system_level_ || mode_->supports_system_level);
- }
-
bool system_level() const { return system_level_; }
const wchar_t* default_channel() const { return mode_->default_channel_name; }
« no previous file with comments | « chrome/browser/win/chrome_elf_init_unittest.cc ('k') | chrome/install_static/product_install_details_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698