Index: base/file_util_unittest.cc |
diff --git a/base/file_util_unittest.cc b/base/file_util_unittest.cc |
index 787b6d50ba7df6f1472a59371fee4070c13c9da4..1ca70b4f899d45e4b9db03d64bbafc6f0cc408e1 100644 |
--- a/base/file_util_unittest.cc |
+++ b/base/file_util_unittest.cc |
@@ -244,108 +244,6 @@ uint64 FileTimeAsUint64(const FILETIME& ft) { |
} |
#endif |
-const struct append_case { |
- const wchar_t* path; |
- const wchar_t* ending; |
- const wchar_t* result; |
-} append_cases[] = { |
-#if defined(OS_WIN) |
- {L"c:\\colon\\backslash", L"path", L"c:\\colon\\backslash\\path"}, |
- {L"c:\\colon\\backslash\\", L"path", L"c:\\colon\\backslash\\path"}, |
- {L"c:\\colon\\backslash\\\\", L"path", L"c:\\colon\\backslash\\\\path"}, |
- {L"c:\\colon\\backslash\\", L"", L"c:\\colon\\backslash\\"}, |
- {L"c:\\colon\\backslash", L"", L"c:\\colon\\backslash\\"}, |
- {L"", L"path", L"\\path"}, |
- {L"", L"", L"\\"}, |
-#elif defined(OS_POSIX) |
- {L"/foo/bar", L"path", L"/foo/bar/path"}, |
- {L"/foo/bar/", L"path", L"/foo/bar/path"}, |
- {L"/foo/bar//", L"path", L"/foo/bar//path"}, |
- {L"/foo/bar/", L"", L"/foo/bar/"}, |
- {L"/foo/bar", L"", L"/foo/bar/"}, |
- {L"", L"path", L"/path"}, |
- {L"", L"", L"/"}, |
-#endif |
-}; |
- |
-static const struct filename_case { |
- const wchar_t* path; |
- const wchar_t* filename; |
-} filename_cases[] = { |
-#if defined(OS_WIN) |
- {L"c:\\colon\\backslash", L"backslash"}, |
- {L"c:\\colon\\backslash\\", L""}, |
- {L"\\\\filename.exe", L"filename.exe"}, |
- {L"filename.exe", L"filename.exe"}, |
- {L"", L""}, |
- {L"\\\\\\", L""}, |
- {L"c:/colon/backslash", L"backslash"}, |
- {L"c:/colon/backslash/", L""}, |
- {L"//////", L""}, |
- {L"///filename.exe", L"filename.exe"}, |
-#elif defined(OS_POSIX) |
- {L"/foo/bar", L"bar"}, |
- {L"/foo/bar/", L""}, |
- {L"/filename.exe", L"filename.exe"}, |
- {L"filename.exe", L"filename.exe"}, |
- {L"", L""}, |
- {L"/", L""}, |
-#endif |
-}; |
- |
-// Test finding the file type from a path name |
-static const struct extension_case { |
- const wchar_t* path; |
- const wchar_t* extension; |
-} extension_cases[] = { |
-#if defined(OS_WIN) |
- {L"C:\\colon\\backslash\\filename.extension", L"extension"}, |
- {L"C:\\colon\\backslash\\filename.", L""}, |
- {L"C:\\colon\\backslash\\filename", L""}, |
- {L"C:\\colon\\backslash\\", L""}, |
- {L"C:\\colon\\backslash.\\", L""}, |
- {L"C:\\colon\\backslash\filename.extension.extension2", L"extension2"}, |
-#elif defined(OS_POSIX) |
- {L"/foo/bar/filename.extension", L"extension"}, |
- {L"/foo/bar/filename.", L""}, |
- {L"/foo/bar/filename", L""}, |
- {L"/foo/bar/", L""}, |
- {L"/foo/bar./", L""}, |
- {L"/foo/bar/filename.extension.extension2", L"extension2"}, |
- {L".", L""}, |
- {L"..", L""}, |
- {L"./foo", L""}, |
- {L"./foo.extension", L"extension"}, |
- {L"/foo.extension1/bar.extension2", L"extension2"}, |
-#endif |
-}; |
- |
-// Test finding the directory component of a path |
-static const struct dir_case { |
- const wchar_t* full_path; |
- const wchar_t* directory; |
-} dir_cases[] = { |
-#if defined(OS_WIN) |
- {L"C:\\WINDOWS\\system32\\gdi32.dll", L"C:\\WINDOWS\\system32"}, |
- {L"C:\\WINDOWS\\system32\\not_exist_thx_1138", L"C:\\WINDOWS\\system32"}, |
- {L"C:\\WINDOWS\\system32\\", L"C:\\WINDOWS\\system32"}, |
- {L"C:\\WINDOWS\\system32\\\\", L"C:\\WINDOWS\\system32"}, |
- {L"C:\\WINDOWS\\system32", L"C:\\WINDOWS"}, |
- {L"C:\\WINDOWS\\system32.\\", L"C:\\WINDOWS\\system32."}, |
- {L"C:\\", L"C:\\"}, |
-#elif defined(OS_POSIX) |
- {L"/foo/bar/gdi32.dll", L"/foo/bar"}, |
- {L"/foo/bar/not_exist_thx_1138", L"/foo/bar"}, |
- {L"/foo/bar/", L"/foo/bar"}, |
- {L"/foo/bar//", L"/foo/bar"}, |
- {L"/foo/bar", L"/foo"}, |
- {L"/foo/bar./", L"/foo/bar."}, |
- {L"/", L"/"}, |
- {L".", L"."}, |
- {L"..", L"."}, // yes, ".." technically lives in "." |
-#endif |
-}; |
- |
TEST_F(FileUtilTest, FileAndDirectorySize) { |
// Create three files of 20, 30 and 3 chars (utf8). ComputeDirectorySize |
// should return 53 bytes. |