OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser/download/download_util.h" | 5 #include "chrome/browser/download/download_util.h" |
6 | 6 |
7 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 7 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
8 #include <locale.h> | 8 #include <locale.h> |
9 #endif | 9 #endif |
10 | 10 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
572 | 572 |
573 TEST(DownloadUtilTest, GenerateSafeFileName) { | 573 TEST(DownloadUtilTest, GenerateSafeFileName) { |
574 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kSafeFilenameCases); ++i) { | 574 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kSafeFilenameCases); ++i) { |
575 FilePath path(kSafeFilenameCases[i].path); | 575 FilePath path(kSafeFilenameCases[i].path); |
576 download_util::GenerateSafeFileName(kSafeFilenameCases[i].mime_type, &path); | 576 download_util::GenerateSafeFileName(kSafeFilenameCases[i].mime_type, &path); |
577 EXPECT_EQ(kSafeFilenameCases[i].expected_path, path.value()) << i; | 577 EXPECT_EQ(kSafeFilenameCases[i].expected_path, path.value()) << i; |
578 } | 578 } |
579 } | 579 } |
580 | 580 |
581 } // namespace | 581 } // namespace |
582 | |
OLD | NEW |