| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 #include <shellapi.h> | 6 #include <shellapi.h> |
| 7 #include <shlobj.h> | 7 #include <shlobj.h> |
| 8 | 8 |
| 9 #include <fstream> | 9 #include <fstream> |
| 10 #include <iostream> | |
| 11 | 10 |
| 12 #include "base/file_util.h" | 11 #include "base/file_util.h" |
| 13 #include "base/path_service.h" | 12 #include "base/path_service.h" |
| 14 #include "base/scoped_comptr_win.h" | 13 #include "base/scoped_comptr_win.h" |
| 15 #include "chrome/installer/util/master_preferences.h" | 14 #include "chrome/installer/util/master_preferences.h" |
| 16 #include "chrome/installer/util/shell_util.h" | 15 #include "chrome/installer/util/shell_util.h" |
| 17 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 18 | 17 |
| 19 namespace { | 18 namespace { |
| 20 bool VerifyChromeShortcut(const std::wstring& exe_path, | 19 bool VerifyChromeShortcut(const std::wstring& exe_path, |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 // Now change only description to update shortcut and make sure icon index | 149 // Now change only description to update shortcut and make sure icon index |
| 151 // doesn't change. | 150 // doesn't change. |
| 152 const std::wstring description2(L"dummy description 2"); | 151 const std::wstring description2(L"dummy description 2"); |
| 153 EXPECT_TRUE(ShellUtil::UpdateChromeShortcut(exe_path.value(), | 152 EXPECT_TRUE(ShellUtil::UpdateChromeShortcut(exe_path.value(), |
| 154 shortcut_path.value(), | 153 shortcut_path.value(), |
| 155 description2, false)); | 154 description2, false)); |
| 156 EXPECT_TRUE(VerifyChromeShortcut(exe_path.value(), | 155 EXPECT_TRUE(VerifyChromeShortcut(exe_path.value(), |
| 157 shortcut_path.value(), | 156 shortcut_path.value(), |
| 158 description2, 1)); | 157 description2, 1)); |
| 159 } | 158 } |
| OLD | NEW |