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

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

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . 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
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 <windows.h> 5 #include <windows.h>
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 work_item1->Rollback(); 209 work_item1->Rollback();
210 work_item2->Rollback(); 210 work_item2->Rollback();
211 211
212 EXPECT_TRUE(test_key_.HasValue(kNameStr)); 212 EXPECT_TRUE(test_key_.HasValue(kNameStr));
213 EXPECT_EQ(ERROR_SUCCESS, test_key_.ReadValue(kNameStr, &read_out)); 213 EXPECT_EQ(ERROR_SUCCESS, test_key_.ReadValue(kNameStr, &read_out));
214 EXPECT_EQ(read_out, kDataStr1); 214 EXPECT_EQ(read_out, kDataStr1);
215 215
216 DWORD type = 0; 216 DWORD type = 0;
217 DWORD size = 0; 217 DWORD size = 0;
218 EXPECT_EQ(ERROR_SUCCESS, test_key_.ReadValue(kNameEmpty, NULL, &size, &type)); 218 EXPECT_EQ(ERROR_SUCCESS, test_key_.ReadValue(kNameEmpty, NULL, &size, &type));
219 EXPECT_EQ(REG_SZ, type); 219 EXPECT_EQ(static_cast<DWORD>(REG_SZ), type);
220 EXPECT_EQ(0, size); 220 EXPECT_EQ(0u, size);
221 221
222 // Now test REG_DWORD value. 222 // Now test REG_DWORD value.
223 // Write data to the value we are going to set. 223 // Write data to the value we are going to set.
224 ASSERT_EQ(ERROR_SUCCESS, test_key_.WriteValue(kNameDword, kDword1)); 224 ASSERT_EQ(ERROR_SUCCESS, test_key_.WriteValue(kNameDword, kDword1));
225 scoped_ptr<SetRegValueWorkItem> work_item3( 225 scoped_ptr<SetRegValueWorkItem> work_item3(
226 WorkItem::CreateSetRegValueWorkItem(HKEY_CURRENT_USER, 226 WorkItem::CreateSetRegValueWorkItem(HKEY_CURRENT_USER,
227 kTestKey, 227 kTestKey,
228 WorkItem::kWow64Default, 228 WorkItem::kWow64Default,
229 kNameDword, 229 kNameDword,
230 kDword2, 230 kDword2,
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 376
377 work_item->Rollback(); 377 work_item->Rollback();
378 378
379 DWORD read_dword_out = 0; 379 DWORD read_dword_out = 0;
380 EXPECT_TRUE(test_key_.HasValue(kNameStr)); 380 EXPECT_TRUE(test_key_.HasValue(kNameStr));
381 EXPECT_EQ(ERROR_SUCCESS, test_key_.ReadValueDW(kNameStr, &read_dword_out)); 381 EXPECT_EQ(ERROR_SUCCESS, test_key_.ReadValueDW(kNameStr, &read_dword_out));
382 EXPECT_EQ(read_dword_out, kDword1); 382 EXPECT_EQ(read_dword_out, kDword1);
383 383
384 EXPECT_EQ(1, callback_invocation_count); 384 EXPECT_EQ(1, callback_invocation_count);
385 } 385 }
OLDNEW
« no previous file with comments | « chrome/installer/util/self_cleaning_temp_dir_unittest.cc ('k') | chrome/installer/util/shell_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698