summaryrefslogtreecommitdiffstats
path: root/base/file_path_unittest.cc
diff options
context:
space:
mode:
authorkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 02:04:40 +0000
committerkinuko@chromium.org <kinuko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-10 02:04:40 +0000
commitd9034ed2e96d3910c1f4d4d0f9ad3c7ce048679a (patch)
treecb4454406c639bc0aa5c5a520e5967619ac50109 /base/file_path_unittest.cc
parent554efaa8b3220e675ad3743eca7f699ad52e2c82 (diff)
downloadchromium_src-d9034ed2e96d3910c1f4d4d0f9ad3c7ce048679a.zip
chromium_src-d9034ed2e96d3910c1f4d4d0f9ad3c7ce048679a.tar.gz
chromium_src-d9034ed2e96d3910c1f4d4d0f9ad3c7ce048679a.tar.bz2
Define FilePath::NormalizePathSeparators on all platforms
I assume the method FilePath::NormalizeWindowsPathSeparators() is intentionally defined only on Windows, but recently I found myself trying to add a static method (named NormalizePathSeparators()) which calls NormalizeWindowsPathSeparators() or does nothing with platform ifdefs, and then found that there's another place defining the same static method. Maybe we could just add the common method in FilePath then? It'd at least make the code cleaner at several callsites. I don't think this has visible negative performance impact with optimization build. BUG=none TEST=FilePathTest.NormalizePathSeparators and all other existing tests Review URL: https://chromiumcodereview.appspot.com/9320059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@121380 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path_unittest.cc')
-rw-r--r--base/file_path_unittest.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/base/file_path_unittest.cc b/base/file_path_unittest.cc
index 9890e80..49fd1e0 100644
--- a/base/file_path_unittest.cc
+++ b/base/file_path_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -1074,7 +1074,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe) {
}
#if defined(FILE_PATH_USES_WIN_SEPARATORS)
-TEST_F(FilePathTest, NormalizeWindowsPathSeparators) {
+TEST_F(FilePathTest, NormalizePathSeparators) {
const struct UnaryTestData cases[] = {
{ FPL("foo/bar"), FPL("foo\\bar") },
{ FPL("foo/bar\\betz"), FPL("foo\\bar\\betz") },
@@ -1110,7 +1110,7 @@ TEST_F(FilePathTest, NormalizeWindowsPathSeparators) {
};
for (size_t i = 0; i < arraysize(cases); ++i) {
FilePath input(cases[i].input);
- FilePath observed = input.NormalizeWindowsPathSeparators();
+ FilePath observed = input.NormalizePathSeparators();
EXPECT_EQ(FilePath::StringType(cases[i].expected), observed.value()) <<
"i: " << i << ", input: " << input.value();
}