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

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

Issue 1575523002: Comparison and streaming operators for base::Version (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixes mistake in previous patch set. Created 4 years, 11 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/google_update_settings.h" 5 #include "chrome/installer/util/google_update_settings.h"
6 6
7 #include <windows.h> 7 #include <windows.h>
8 #include <shlwapi.h> // For SHDeleteKey. 8 #include <shlwapi.h> // For SHDeleteKey.
9 #include <stddef.h> 9 #include <stddef.h>
10 10
(...skipping 1079 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 .WriteValue(google_update::kRegGoogleUpdateVersion, L""); 1090 .WriteValue(google_update::kRegGoogleUpdateVersion, L"");
1091 EXPECT_FALSE( 1091 EXPECT_FALSE(
1092 GoogleUpdateSettings::GetGoogleUpdateVersion(system_install_).IsValid()); 1092 GoogleUpdateSettings::GetGoogleUpdateVersion(system_install_).IsValid());
1093 } 1093 }
1094 1094
1095 // Tests that GetGoogleUpdateVersion returns the correct string if there's a 1095 // Tests that GetGoogleUpdateVersion returns the correct string if there's a
1096 // version value in the Software\Google\Update key. 1096 // version value in the Software\Google\Update key.
1097 TEST_P(GetGoogleUpdateVersion, TestRealValue) { 1097 TEST_P(GetGoogleUpdateVersion, TestRealValue) {
1098 RegKey(root_key_, google_update::kRegPathGoogleUpdate, KEY_SET_VALUE) 1098 RegKey(root_key_, google_update::kRegPathGoogleUpdate, KEY_SET_VALUE)
1099 .WriteValue(google_update::kRegGoogleUpdateVersion, kDummyVersion); 1099 .WriteValue(google_update::kRegGoogleUpdateVersion, kDummyVersion);
1100 Version expected(base::UTF16ToUTF8(kDummyVersion)); 1100 base::Version expected(base::UTF16ToUTF8(kDummyVersion));
1101 EXPECT_TRUE(expected.Equals( 1101 EXPECT_EQ(expected,
1102 GoogleUpdateSettings::GetGoogleUpdateVersion(system_install_))); 1102 GoogleUpdateSettings::GetGoogleUpdateVersion(system_install_));
1103 // Make sure that there's no value in the other level (user or system). 1103 // Make sure that there's no value in the other level (user or system).
1104 EXPECT_FALSE( 1104 EXPECT_FALSE(
1105 GoogleUpdateSettings::GetGoogleUpdateVersion(!system_install_) 1105 GoogleUpdateSettings::GetGoogleUpdateVersion(!system_install_)
1106 .IsValid()); 1106 .IsValid());
1107 } 1107 }
1108 1108
1109 INSTANTIATE_TEST_CASE_P(GetGoogleUpdateVersionAtLevel, GetGoogleUpdateVersion, 1109 INSTANTIATE_TEST_CASE_P(GetGoogleUpdateVersionAtLevel, GetGoogleUpdateVersion,
1110 testing::Bool()); 1110 testing::Bool());
1111 1111
1112 // Test values for use by the CollectStatsConsent test fixture. 1112 // Test values for use by the CollectStatsConsent test fixture.
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1366 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1367 StatsState::FALSE_SETTING, StatsState::FALSE_SETTING), 1367 StatsState::FALSE_SETTING, StatsState::FALSE_SETTING),
1368 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1368 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1369 StatsState::FALSE_SETTING, StatsState::TRUE_SETTING), 1369 StatsState::FALSE_SETTING, StatsState::TRUE_SETTING),
1370 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1370 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1371 StatsState::TRUE_SETTING, StatsState::NO_SETTING), 1371 StatsState::TRUE_SETTING, StatsState::NO_SETTING),
1372 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1372 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1373 StatsState::TRUE_SETTING, StatsState::FALSE_SETTING), 1373 StatsState::TRUE_SETTING, StatsState::FALSE_SETTING),
1374 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL, 1374 StatsState(StatsState::kSystemLevel, StatsState::MULTI_INSTALL,
1375 StatsState::TRUE_SETTING, StatsState::TRUE_SETTING))); 1375 StatsState::TRUE_SETTING, StatsState::TRUE_SETTING)));
OLDNEW
« no previous file with comments | « chrome/installer/setup/install_worker.cc ('k') | chrome/installer/util/installer_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698