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 "chrome/installer/util/shell_util.h" | 5 #include "chrome/installer/util/shell_util.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
10 #include "base/base_paths_win.h" | 10 #include "base/base_paths_win.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 new base::ScopedPathOverride(base::DIR_DEFAULT_USER_QUICK_LAUNCH, | 66 new base::ScopedPathOverride(base::DIR_DEFAULT_USER_QUICK_LAUNCH, |
67 fake_default_user_quick_launch_.path())); | 67 fake_default_user_quick_launch_.path())); |
68 start_menu_override_.reset( | 68 start_menu_override_.reset( |
69 new base::ScopedPathOverride(base::DIR_START_MENU, | 69 new base::ScopedPathOverride(base::DIR_START_MENU, |
70 fake_start_menu_.path())); | 70 fake_start_menu_.path())); |
71 common_start_menu_override_.reset( | 71 common_start_menu_override_.reset( |
72 new base::ScopedPathOverride(base::DIR_COMMON_START_MENU, | 72 new base::ScopedPathOverride(base::DIR_COMMON_START_MENU, |
73 fake_common_start_menu_.path())); | 73 fake_common_start_menu_.path())); |
74 | 74 |
75 base::FilePath icon_path; | 75 base::FilePath icon_path; |
76 file_util::CreateTemporaryFileInDir(temp_dir_.path(), &icon_path); | 76 base::CreateTemporaryFileInDir(temp_dir_.path(), &icon_path); |
77 test_properties_.set_target(chrome_exe_); | 77 test_properties_.set_target(chrome_exe_); |
78 test_properties_.set_arguments(L"--test --chrome"); | 78 test_properties_.set_arguments(L"--test --chrome"); |
79 test_properties_.set_description(L"Makes polar bears dance."); | 79 test_properties_.set_description(L"Makes polar bears dance."); |
80 test_properties_.set_icon(icon_path, 0); | 80 test_properties_.set_icon(icon_path, 0); |
81 test_properties_.set_app_id(L"Polar.Bear"); | 81 test_properties_.set_app_id(L"Polar.Bear"); |
82 test_properties_.set_dual_mode(true); | 82 test_properties_.set_dual_mode(true); |
83 } | 83 } |
84 | 84 |
85 // Validates that the shortcut at |location| matches |properties| (and | 85 // Validates that the shortcut at |location| matches |properties| (and |
86 // implicit default properties) for |dist|. | 86 // implicit default properties) for |dist|. |
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
662 | 662 |
663 const string16 expected[] = { L"", L"MY", L"MZXQ", L"MZXW6", L"MZXW6YQ", | 663 const string16 expected[] = { L"", L"MY", L"MZXQ", L"MZXW6", L"MZXW6YQ", |
664 L"MZXW6YTB", L"MZXW6YTBOI"}; | 664 L"MZXW6YTB", L"MZXW6YTBOI"}; |
665 | 665 |
666 // Run the tests, with one more letter in the input every pass. | 666 // Run the tests, with one more letter in the input every pass. |
667 for (int i = 0; i < arraysize(expected); ++i) { | 667 for (int i = 0; i < arraysize(expected); ++i) { |
668 ASSERT_EQ(expected[i], | 668 ASSERT_EQ(expected[i], |
669 ShellUtil::ByteArrayToBase32(test_array, i)); | 669 ShellUtil::ByteArrayToBase32(test_array, i)); |
670 } | 670 } |
671 } | 671 } |
OLD | NEW |