Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(111)

Unified Diff: base/i18n/file_util_icu_unittest.cc

Issue 447403002: Move file_util_icu to base::i18n namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/i18n/file_util_icu.cc ('k') | chrome/browser/download/save_package_file_picker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/file_util_icu_unittest.cc
diff --git a/base/i18n/file_util_icu_unittest.cc b/base/i18n/file_util_icu_unittest.cc
index dd8122632e84df55303a135a018ed9140b6de22a..cdb48a12ab973f20117e396bb4e3b14cb169d956 100644
--- a/base/i18n/file_util_icu_unittest.cc
+++ b/base/i18n/file_util_icu_unittest.cc
@@ -9,6 +9,9 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
+namespace base {
+namespace i18n {
+
// file_util winds up using autoreleased objects on the Mac, so this needs
// to be a PlatformTest
class FileUtilICUTest : public PlatformTest {
@@ -29,7 +32,7 @@ static const struct goodbad_pair {
TEST_F(FileUtilICUTest, ReplaceIllegalCharacersInPathLinuxTest) {
for (size_t i = 0; i < arraysize(kIllegalCharacterCases); ++i) {
std::string bad_name(kIllegalCharacterCases[i].bad_name);
- file_util::ReplaceIllegalCharactersInPath(&bad_name, '-');
+ ReplaceIllegalCharactersInPath(&bad_name, '-');
EXPECT_EQ(kIllegalCharacterCases[i].good_name, bad_name);
}
}
@@ -70,12 +73,12 @@ TEST_F(FileUtilICUTest, ReplaceIllegalCharactersInPathTest) {
for (size_t i = 0; i < arraysize(kIllegalCharacterCases); ++i) {
#if defined(OS_WIN)
std::wstring bad_name(kIllegalCharacterCases[i].bad_name);
- file_util::ReplaceIllegalCharactersInPath(&bad_name, '-');
+ ReplaceIllegalCharactersInPath(&bad_name, '-');
EXPECT_EQ(kIllegalCharacterCases[i].good_name, bad_name);
#elif defined(OS_MACOSX)
- std::string bad_name(base::WideToUTF8(kIllegalCharacterCases[i].bad_name));
- file_util::ReplaceIllegalCharactersInPath(&bad_name, '-');
- EXPECT_EQ(base::WideToUTF8(kIllegalCharacterCases[i].good_name), bad_name);
+ std::string bad_name(WideToUTF8(kIllegalCharacterCases[i].bad_name));
+ ReplaceIllegalCharactersInPath(&bad_name, '-');
+ EXPECT_EQ(WideToUTF8(kIllegalCharacterCases[i].good_name), bad_name);
#endif
}
}
@@ -96,12 +99,14 @@ static const struct normalize_name_encoding_test_cases {
TEST_F(FileUtilICUTest, NormalizeFileNameEncoding) {
for (size_t i = 0; i < arraysize(kNormalizeFileNameEncodingTestCases); i++) {
- base::FilePath path(kNormalizeFileNameEncodingTestCases[i].original_path);
- file_util::NormalizeFileNameEncoding(&path);
- EXPECT_EQ(
- base::FilePath(kNormalizeFileNameEncodingTestCases[i].normalized_path),
- path);
+ FilePath path(kNormalizeFileNameEncodingTestCases[i].original_path);
+ NormalizeFileNameEncoding(&path);
+ EXPECT_EQ(FilePath(kNormalizeFileNameEncodingTestCases[i].normalized_path),
+ path);
}
}
#endif
+
+} // namespace i18n
+} // namespace base
« no previous file with comments | « base/i18n/file_util_icu.cc ('k') | chrome/browser/download/save_package_file_picker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698