OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 16 matching lines...) Expand all Loading... |
27 #include "testing/gtest/include/gtest/gtest.h" | 27 #include "testing/gtest/include/gtest/gtest.h" |
28 #include "testing/platform_test.h" | 28 #include "testing/platform_test.h" |
29 | 29 |
30 #if defined(OS_WIN) | 30 #if defined(OS_WIN) |
31 #include "base/win/scoped_handle.h" | 31 #include "base/win/scoped_handle.h" |
32 #endif | 32 #endif |
33 | 33 |
34 // This macro helps avoid wrapped lines in the test structs. | 34 // This macro helps avoid wrapped lines in the test structs. |
35 #define FPL(x) FILE_PATH_LITERAL(x) | 35 #define FPL(x) FILE_PATH_LITERAL(x) |
36 | 36 |
| 37 using base::FilePath; |
| 38 |
37 namespace { | 39 namespace { |
38 | 40 |
39 // To test that file_util::Normalize FilePath() deals with NTFS reparse points | 41 // To test that file_util::Normalize FilePath() deals with NTFS reparse points |
40 // correctly, we need functions to create and delete reparse points. | 42 // correctly, we need functions to create and delete reparse points. |
41 #if defined(OS_WIN) | 43 #if defined(OS_WIN) |
42 typedef struct _REPARSE_DATA_BUFFER { | 44 typedef struct _REPARSE_DATA_BUFFER { |
43 ULONG ReparseTag; | 45 ULONG ReparseTag; |
44 USHORT ReparseDataLength; | 46 USHORT ReparseDataLength; |
45 USHORT Reserved; | 47 USHORT Reserved; |
46 union { | 48 union { |
(...skipping 2407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2454 file_util::VerifyPathControlledByUser( | 2456 file_util::VerifyPathControlledByUser( |
2455 base_dir_, text_file_, uid_, ok_gids_)); | 2457 base_dir_, text_file_, uid_, ok_gids_)); |
2456 EXPECT_TRUE( | 2458 EXPECT_TRUE( |
2457 file_util::VerifyPathControlledByUser( | 2459 file_util::VerifyPathControlledByUser( |
2458 sub_dir_, text_file_, uid_, ok_gids_)); | 2460 sub_dir_, text_file_, uid_, ok_gids_)); |
2459 } | 2461 } |
2460 | 2462 |
2461 #endif // defined(OS_POSIX) | 2463 #endif // defined(OS_POSIX) |
2462 | 2464 |
2463 } // namespace | 2465 } // namespace |
OLD | NEW |