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

Side by Side Diff: base/file_util_unittest.cc

Issue 271086: Remove file_util::TrimTrailingSeparators(), which is deprecated and... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/file_util_posix.cc ('k') | base/file_util_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <shlobj.h> 10 #include <shlobj.h>
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 const wchar_t* full_path; 290 const wchar_t* full_path;
291 const wchar_t* directory; 291 const wchar_t* directory;
292 } dir_cases[] = { 292 } dir_cases[] = {
293 #if defined(OS_WIN) 293 #if defined(OS_WIN)
294 {L"C:\\WINDOWS\\system32\\gdi32.dll", L"C:\\WINDOWS\\system32"}, 294 {L"C:\\WINDOWS\\system32\\gdi32.dll", L"C:\\WINDOWS\\system32"},
295 {L"C:\\WINDOWS\\system32\\not_exist_thx_1138", L"C:\\WINDOWS\\system32"}, 295 {L"C:\\WINDOWS\\system32\\not_exist_thx_1138", L"C:\\WINDOWS\\system32"},
296 {L"C:\\WINDOWS\\system32\\", L"C:\\WINDOWS\\system32"}, 296 {L"C:\\WINDOWS\\system32\\", L"C:\\WINDOWS\\system32"},
297 {L"C:\\WINDOWS\\system32\\\\", L"C:\\WINDOWS\\system32"}, 297 {L"C:\\WINDOWS\\system32\\\\", L"C:\\WINDOWS\\system32"},
298 {L"C:\\WINDOWS\\system32", L"C:\\WINDOWS"}, 298 {L"C:\\WINDOWS\\system32", L"C:\\WINDOWS"},
299 {L"C:\\WINDOWS\\system32.\\", L"C:\\WINDOWS\\system32."}, 299 {L"C:\\WINDOWS\\system32.\\", L"C:\\WINDOWS\\system32."},
300 {L"C:\\", L"C:"}, 300 {L"C:\\", L"C:\\"},
301 #elif defined(OS_POSIX) 301 #elif defined(OS_POSIX)
302 {L"/foo/bar/gdi32.dll", L"/foo/bar"}, 302 {L"/foo/bar/gdi32.dll", L"/foo/bar"},
303 {L"/foo/bar/not_exist_thx_1138", L"/foo/bar"}, 303 {L"/foo/bar/not_exist_thx_1138", L"/foo/bar"},
304 {L"/foo/bar/", L"/foo/bar"}, 304 {L"/foo/bar/", L"/foo/bar"},
305 {L"/foo/bar//", L"/foo/bar"}, 305 {L"/foo/bar//", L"/foo/bar"},
306 {L"/foo/bar", L"/foo"}, 306 {L"/foo/bar", L"/foo"},
307 {L"/foo/bar./", L"/foo/bar."}, 307 {L"/foo/bar./", L"/foo/bar."},
308 {L"/", L"/"}, 308 {L"/", L"/"},
309 {L".", L"."}, 309 {L".", L"."},
310 {L"..", L"."}, // yes, ".." technically lives in "." 310 {L"..", L"."}, // yes, ".." technically lives in "."
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
1239 #elif defined(OS_LINUX) 1239 #elif defined(OS_LINUX)
1240 EXPECT_FALSE(file_util::ContainsPath(foo, 1240 EXPECT_FALSE(file_util::ContainsPath(foo,
1241 foo_caps.Append(FILE_PATH_LITERAL("bar.txt")))); 1241 foo_caps.Append(FILE_PATH_LITERAL("bar.txt"))));
1242 #else 1242 #else
1243 // We can't really do this test on osx since the case-sensitivity of the 1243 // We can't really do this test on osx since the case-sensitivity of the
1244 // filesystem is configurable. 1244 // filesystem is configurable.
1245 #endif 1245 #endif
1246 } 1246 }
1247 1247
1248 } // namespace 1248 } // namespace
OLDNEW
« no previous file with comments | « base/file_util_posix.cc ('k') | base/file_util_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698