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

Side by Side Diff: base/file_util_unittest.cc

Issue 8380022: Fix the file_util_unittests.cc for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Init Created 9 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 | « no previous file | no next file » | 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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>
11 #include <tchar.h> 11 #include <tchar.h>
12 #include <winioctl.h> 12 #include <winioctl.h>
13 #endif 13 #endif
14 14
Mark Mentovai 2011/10/24 22:17:07 #include <algorithm> unconditionally here. set_uni
15 #include <fstream> 15 #include <fstream>
16 #include <set> 16 #include <set>
17 17
18 #include "base/base_paths.h" 18 #include "base/base_paths.h"
19 #include "base/file_path.h" 19 #include "base/file_path.h"
20 #include "base/file_util.h" 20 #include "base/file_util.h"
21 #include "base/path_service.h" 21 #include "base/path_service.h"
22 #include "base/scoped_temp_dir.h" 22 #include "base/scoped_temp_dir.h"
23 #include "base/threading/platform_thread.h" 23 #include "base/threading/platform_thread.h"
24 #include "base/time.h" 24 #include "base/time.h"
25 #include "base/utf_string_conversions.h" 25 #include "base/utf_string_conversions.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 #include "testing/platform_test.h" 27 #include "testing/platform_test.h"
28 28
29 #if defined(OS_WIN) 29 #if defined(OS_WIN)
30 #include "base/win/scoped_handle.h" 30 #include "base/win/scoped_handle.h"
31 #endif 31 #endif
32 32
33 #if defined(OS_ANDROID)
34 #include <algorithm>
35 #endif
36
33 // This macro helps avoid wrapped lines in the test structs. 37 // This macro helps avoid wrapped lines in the test structs.
34 #define FPL(x) FILE_PATH_LITERAL(x) 38 #define FPL(x) FILE_PATH_LITERAL(x)
35 39
36 namespace { 40 namespace {
37 41
38 // To test that file_util::Normalize FilePath() deals with NTFS reparse points 42 // To test that file_util::Normalize FilePath() deals with NTFS reparse points
39 // correctly, we need functions to create and delete reparse points. 43 // correctly, we need functions to create and delete reparse points.
40 #if defined(OS_WIN) 44 #if defined(OS_WIN)
41 typedef struct _REPARSE_DATA_BUFFER { 45 typedef struct _REPARSE_DATA_BUFFER {
42 ULONG ReparseTag; 46 ULONG ReparseTag;
(...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after
2198 file_util::VerifyPathControlledByUser( 2202 file_util::VerifyPathControlledByUser(
2199 base_dir_, text_file_, uid_, ok_gids_)); 2203 base_dir_, text_file_, uid_, ok_gids_));
2200 EXPECT_TRUE( 2204 EXPECT_TRUE(
2201 file_util::VerifyPathControlledByUser( 2205 file_util::VerifyPathControlledByUser(
2202 sub_dir_, text_file_, uid_, ok_gids_)); 2206 sub_dir_, text_file_, uid_, ok_gids_));
2203 } 2207 }
2204 2208
2205 #endif // defined(OS_POSIX) 2209 #endif // defined(OS_POSIX)
2206 2210
2207 } // namespace 2211 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698