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

Side by Side Diff: base/test/test_reg_util_win_unittest.cc

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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
« no previous file with comments | « base/strings/utf_string_conversions_unittest.cc ('k') | base/threading/thread_local_storage.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/compiler_specific.h" 5 #include "base/compiler_specific.h"
6 #include "base/memory/scoped_ptr.h" 6 #include "base/memory/scoped_ptr.h"
7 #include "base/strings/string_number_conversions.h" 7 #include "base/strings/string_number_conversions.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "base/test/test_reg_util_win.h" 9 #include "base/test/test_reg_util_win.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 create_key.Close(); 82 create_key.Close();
83 83
84 AssertKeyExists(kTestKeyPath); 84 AssertKeyExists(kTestKeyPath);
85 85
86 DWORD value; 86 DWORD value;
87 base::win::RegKey read_key; 87 base::win::RegKey read_key;
88 EXPECT_EQ(ERROR_SUCCESS, 88 EXPECT_EQ(ERROR_SUCCESS,
89 read_key.Open(HKEY_CURRENT_USER, kTestKeyPath, KEY_READ)); 89 read_key.Open(HKEY_CURRENT_USER, kTestKeyPath, KEY_READ));
90 EXPECT_TRUE(read_key.Valid()); 90 EXPECT_TRUE(read_key.Valid());
91 EXPECT_EQ(ERROR_SUCCESS, read_key.ReadValueDW(kTestValueName, &value)); 91 EXPECT_EQ(ERROR_SUCCESS, read_key.ReadValueDW(kTestValueName, &value));
92 EXPECT_EQ(42, value); 92 EXPECT_EQ(42u, value);
93 read_key.Close(); 93 read_key.Close();
94 94
95 manager_.reset(); 95 manager_.reset();
96 96
97 AssertKeyAbsent(kTestKeyPath); 97 AssertKeyAbsent(kTestKeyPath);
98 } 98 }
99 99
100 TEST_F(RegistryOverrideManagerTest, DeleteStaleKeys) { 100 TEST_F(RegistryOverrideManagerTest, DeleteStaleKeys) {
101 base::Time::Exploded kTestTimeExploded = {2013, 11, 1, 4, 0, 0, 0, 0}; 101 base::Time::Exploded kTestTimeExploded = {2013, 11, 1, 4, 0, 0, 0, 0};
102 base::Time kTestTime = base::Time::FromUTCExploded(kTestTimeExploded); 102 base::Time kTestTime = base::Time::FromUTCExploded(kTestTimeExploded);
(...skipping 18 matching lines...) Expand all
121 manager_.reset(); 121 manager_.reset();
122 122
123 AssertKeyAbsent(path_garbage); 123 AssertKeyAbsent(path_garbage);
124 AssertKeyAbsent(path_very_stale); 124 AssertKeyAbsent(path_very_stale);
125 AssertKeyAbsent(path_stale); 125 AssertKeyAbsent(path_stale);
126 AssertKeyExists(path_current); 126 AssertKeyExists(path_current);
127 AssertKeyExists(path_future); 127 AssertKeyExists(path_future);
128 } 128 }
129 129
130 } // namespace registry_util 130 } // namespace registry_util
OLDNEW
« no previous file with comments | « base/strings/utf_string_conversions_unittest.cc ('k') | base/threading/thread_local_storage.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698