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 <stddef.h> |
| 8 |
7 #include <vector> | 9 #include <vector> |
8 | 10 |
9 #include "base/base_paths.h" | 11 #include "base/base_paths.h" |
10 #include "base/base_paths_win.h" | 12 #include "base/base_paths_win.h" |
11 #include "base/command_line.h" | 13 #include "base/command_line.h" |
12 #include "base/files/file_enumerator.h" | 14 #include "base/files/file_enumerator.h" |
13 #include "base/files/file_path.h" | 15 #include "base/files/file_path.h" |
14 #include "base/files/file_util.h" | 16 #include "base/files/file_util.h" |
15 #include "base/files/scoped_temp_dir.h" | 17 #include "base/files/scoped_temp_dir.h" |
| 18 #include "base/macros.h" |
16 #include "base/md5.h" | 19 #include "base/md5.h" |
17 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
18 #include "base/strings/string16.h" | 21 #include "base/strings/string16.h" |
19 #include "base/strings/string_util.h" | 22 #include "base/strings/string_util.h" |
20 #include "base/synchronization/cancellation_flag.h" | 23 #include "base/synchronization/cancellation_flag.h" |
21 #include "base/test/scoped_path_override.h" | 24 #include "base/test/scoped_path_override.h" |
22 #include "base/test/test_reg_util_win.h" | 25 #include "base/test/test_reg_util_win.h" |
23 #include "base/test/test_shortcut_win.h" | 26 #include "base/test/test_shortcut_win.h" |
24 #include "base/win/registry.h" | 27 #include "base/win/registry.h" |
25 #include "base/win/shortcut.h" | 28 #include "base/win/shortcut.h" |
(...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 | 1049 |
1047 const base::string16 expected[] = { L"", L"MY", L"MZXQ", L"MZXW6", L"MZXW6YQ", | 1050 const base::string16 expected[] = { L"", L"MY", L"MZXQ", L"MZXW6", L"MZXW6YQ", |
1048 L"MZXW6YTB", L"MZXW6YTBOI"}; | 1051 L"MZXW6YTB", L"MZXW6YTBOI"}; |
1049 | 1052 |
1050 // Run the tests, with one more letter in the input every pass. | 1053 // Run the tests, with one more letter in the input every pass. |
1051 for (size_t i = 0; i < arraysize(expected); ++i) { | 1054 for (size_t i = 0; i < arraysize(expected); ++i) { |
1052 ASSERT_EQ(expected[i], | 1055 ASSERT_EQ(expected[i], |
1053 ShellUtil::ByteArrayToBase32(test_array, i)); | 1056 ShellUtil::ByteArrayToBase32(test_array, i)); |
1054 } | 1057 } |
1055 } | 1058 } |
OLD | NEW |