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

Unified Diff: webkit/fileapi/isolated_context_unittest.cc

Issue 9320059: Define FilePath::NormalizePathSeparators on all platforms (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: build fix Created 8 years, 10 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 | « webkit/fileapi/isolated_context.cc ('k') | webkit/fileapi/obfuscated_file_util_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/isolated_context_unittest.cc
diff --git a/webkit/fileapi/isolated_context_unittest.cc b/webkit/fileapi/isolated_context_unittest.cc
index f367292211a0a22b6838fb9c50d39355d878c0b1..e32adefc9d4144ed678d2d1e92d5ca821fc9f0ad 100644
--- a/webkit/fileapi/isolated_context_unittest.cc
+++ b/webkit/fileapi/isolated_context_unittest.cc
@@ -31,21 +31,13 @@ const FilePath kTestPaths[] = {
#endif
};
-static FilePath NormalizePath(const FilePath& path) {
-#if defined(FILE_PATH_USES_WIN_SEPARATORS)
- return path.NormalizeWindowsPathSeparators();
-#else
- return path;
-#endif
-}
-
} // namespace
class IsolatedContextTest : public testing::Test {
public:
IsolatedContextTest() {
for (size_t i = 0; i < arraysize(kTestPaths); ++i)
- fileset_.insert(NormalizePath(kTestPaths[i]));
+ fileset_.insert(kTestPaths[i].NormalizePathSeparators());
}
void SetUp() {
@@ -88,7 +80,8 @@ TEST_F(IsolatedContextTest, RegisterAndRevokeTest) {
FilePath cracked_path;
ASSERT_TRUE(isolated_context()->CrackIsolatedPath(
virtual_path, &cracked_id, &cracked_path));
- ASSERT_EQ(NormalizePath(kTestPaths[i]).value(), cracked_path.value());
+ ASSERT_EQ(kTestPaths[i].NormalizePathSeparators().value(),
+ cracked_path.value());
ASSERT_EQ(id_, cracked_id);
}
@@ -138,7 +131,8 @@ TEST_F(IsolatedContextTest, CrackWithRelativePaths) {
}
ASSERT_TRUE(isolated_context()->CrackIsolatedPath(
virtual_path, &cracked_id, &cracked_path));
- ASSERT_EQ(NormalizePath(kTestPaths[i].Append(relatives[j].path)).value(),
+ ASSERT_EQ(kTestPaths[i].Append(relatives[j].path)
+ .NormalizePathSeparators().value(),
cracked_path.value());
ASSERT_EQ(id_, cracked_id);
}
« no previous file with comments | « webkit/fileapi/isolated_context.cc ('k') | webkit/fileapi/obfuscated_file_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698