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

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

Issue 1878313003: Convert //chrome/installer from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert decompress.cc in mini_installer. Created 4 years, 8 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/registry_key_backup.h"
6
5 #include <windows.h> 7 #include <windows.h>
6 8
9 #include <memory>
10
7 #include "base/logging.h" 11 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h"
9 #include "base/win/registry.h" 12 #include "base/win/registry.h"
10 #include "chrome/installer/util/registry_key_backup.h"
11 #include "chrome/installer/util/registry_test_data.h" 13 #include "chrome/installer/util/registry_test_data.h"
12 #include "chrome/installer/util/work_item.h" 14 #include "chrome/installer/util/work_item.h"
13 #include "testing/gtest/include/gtest/gtest.h" 15 #include "testing/gtest/include/gtest/gtest.h"
14 16
15 using base::win::RegKey; 17 using base::win::RegKey;
16 18
17 class RegistryKeyBackupTest : public testing::Test { 19 class RegistryKeyBackupTest : public testing::Test {
18 protected: 20 protected:
19 static void TearDownTestCase() { 21 static void TearDownTestCase() {
20 logging::CloseLogFile(); 22 logging::CloseLogFile();
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 // Now make sure the one we started with is truly empty. 89 // Now make sure the one we started with is truly empty.
88 EXPECT_EQ(ERROR_SUCCESS, 90 EXPECT_EQ(ERROR_SUCCESS,
89 RegKey(test_data_.root_key(), L"", KEY_QUERY_VALUE) 91 RegKey(test_data_.root_key(), L"", KEY_QUERY_VALUE)
90 .DeleteKey(destination_path_.c_str())); 92 .DeleteKey(destination_path_.c_str()));
91 EXPECT_TRUE(backup.WriteTo(test_data_.root_key(), 93 EXPECT_TRUE(backup.WriteTo(test_data_.root_key(),
92 destination_path_.c_str(), 94 destination_path_.c_str(),
93 WorkItem::kWow64Default)); 95 WorkItem::kWow64Default));
94 EXPECT_FALSE(RegKey(test_data_.root_key(), destination_path_.c_str(), 96 EXPECT_FALSE(RegKey(test_data_.root_key(), destination_path_.c_str(),
95 KEY_READ).Valid()); 97 KEY_READ).Valid());
96 } 98 }
OLDNEW
« no previous file with comments | « chrome/installer/util/registry_key_backup.cc ('k') | chrome/installer/util/scoped_user_protocol_entry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698