| OLD | NEW |
| 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> |
| (...skipping 1527 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1538 temp_dir_.path(), | 1538 temp_dir_.path(), |
| 1539 FILE_PATH_LITERAL("CreateNewTemporaryDirInDirTest"), | 1539 FILE_PATH_LITERAL("CreateNewTemporaryDirInDirTest"), |
| 1540 &new_dir)); | 1540 &new_dir)); |
| 1541 EXPECT_TRUE(file_util::PathExists(new_dir)); | 1541 EXPECT_TRUE(file_util::PathExists(new_dir)); |
| 1542 EXPECT_TRUE(temp_dir_.path().IsParent(new_dir)); | 1542 EXPECT_TRUE(temp_dir_.path().IsParent(new_dir)); |
| 1543 EXPECT_TRUE(file_util::Delete(new_dir, false)); | 1543 EXPECT_TRUE(file_util::Delete(new_dir, false)); |
| 1544 } | 1544 } |
| 1545 | 1545 |
| 1546 TEST_F(FileUtilTest, GetShmemTempDirTest) { | 1546 TEST_F(FileUtilTest, GetShmemTempDirTest) { |
| 1547 FilePath dir; | 1547 FilePath dir; |
| 1548 EXPECT_TRUE(file_util::GetShmemTempDir(&dir)); | 1548 EXPECT_TRUE(file_util::GetShmemTempDir(&dir, false)); |
| 1549 EXPECT_TRUE(file_util::DirectoryExists(dir)); | 1549 EXPECT_TRUE(file_util::DirectoryExists(dir)); |
| 1550 } | 1550 } |
| 1551 | 1551 |
| 1552 TEST_F(FileUtilTest, CreateDirectoryTest) { | 1552 TEST_F(FileUtilTest, CreateDirectoryTest) { |
| 1553 FilePath test_root = | 1553 FilePath test_root = |
| 1554 temp_dir_.path().Append(FILE_PATH_LITERAL("create_directory_test")); | 1554 temp_dir_.path().Append(FILE_PATH_LITERAL("create_directory_test")); |
| 1555 #if defined(OS_WIN) | 1555 #if defined(OS_WIN) |
| 1556 FilePath test_path = | 1556 FilePath test_path = |
| 1557 test_root.Append(FILE_PATH_LITERAL("dir\\tree\\likely\\doesnt\\exist\\")); | 1557 test_root.Append(FILE_PATH_LITERAL("dir\\tree\\likely\\doesnt\\exist\\")); |
| 1558 #elif defined(OS_POSIX) | 1558 #elif defined(OS_POSIX) |
| (...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2199 file_util::VerifyPathControlledByUser( | 2199 file_util::VerifyPathControlledByUser( |
| 2200 base_dir_, text_file_, uid_, ok_gids_)); | 2200 base_dir_, text_file_, uid_, ok_gids_)); |
| 2201 EXPECT_TRUE( | 2201 EXPECT_TRUE( |
| 2202 file_util::VerifyPathControlledByUser( | 2202 file_util::VerifyPathControlledByUser( |
| 2203 sub_dir_, text_file_, uid_, ok_gids_)); | 2203 sub_dir_, text_file_, uid_, ok_gids_)); |
| 2204 } | 2204 } |
| 2205 | 2205 |
| 2206 #endif // defined(OS_POSIX) | 2206 #endif // defined(OS_POSIX) |
| 2207 | 2207 |
| 2208 } // namespace | 2208 } // namespace |
| OLD | NEW |