| OLD | NEW |
| 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 "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/win/registry.h" | 10 #include "base/win/registry.h" |
| 11 #include "chrome/installer/util/set_reg_value_work_item.h" | 11 #include "chrome/installer/util/set_reg_value_work_item.h" |
| 12 #include "chrome/installer/util/work_item.h" | 12 #include "chrome/installer/util/work_item.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 14 |
| 15 using base::win::RegKey; | 15 using base::win::RegKey; |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 const wchar_t kTestRoot[] = L"TempTemp"; | 19 const wchar_t kTestRoot[] = L"TempTemp"; |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 std::wstring data(kDataStr1); | 257 std::wstring data(kDataStr1); |
| 258 scoped_ptr<SetRegValueWorkItem> work_item( | 258 scoped_ptr<SetRegValueWorkItem> work_item( |
| 259 WorkItem::CreateSetRegValueWorkItem(HKEY_CURRENT_USER, parent_key, | 259 WorkItem::CreateSetRegValueWorkItem(HKEY_CURRENT_USER, parent_key, |
| 260 name, data, false)); | 260 name, data, false)); |
| 261 EXPECT_FALSE(work_item->Do()); | 261 EXPECT_FALSE(work_item->Do()); |
| 262 | 262 |
| 263 work_item.reset(WorkItem::CreateSetRegValueWorkItem(HKEY_CURRENT_USER, | 263 work_item.reset(WorkItem::CreateSetRegValueWorkItem(HKEY_CURRENT_USER, |
| 264 parent_key, name, dword1, false)); | 264 parent_key, name, dword1, false)); |
| 265 EXPECT_FALSE(work_item->Do()); | 265 EXPECT_FALSE(work_item->Do()); |
| 266 } | 266 } |
| OLD | NEW |