OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |