OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <winioctl.h> | 9 #include <winioctl.h> |
10 #include <shellapi.h> | 10 #include <shellapi.h> |
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1562 &temp_dir)); | 1562 &temp_dir)); |
1563 EXPECT_TRUE(file_util::PathExists(temp_dir)); | 1563 EXPECT_TRUE(file_util::PathExists(temp_dir)); |
1564 EXPECT_TRUE(file_util::Delete(temp_dir, false)); | 1564 EXPECT_TRUE(file_util::Delete(temp_dir, false)); |
1565 } | 1565 } |
1566 | 1566 |
1567 TEST_F(FileUtilTest, CreateNewTemporaryDirInDirTest) { | 1567 TEST_F(FileUtilTest, CreateNewTemporaryDirInDirTest) { |
1568 FilePath new_dir; | 1568 FilePath new_dir; |
1569 ASSERT_TRUE(file_util::CreateTemporaryDirInDir( | 1569 ASSERT_TRUE(file_util::CreateTemporaryDirInDir( |
1570 test_dir_, | 1570 test_dir_, |
1571 FILE_PATH_LITERAL("CreateNewTemporaryDirInDirTest"), | 1571 FILE_PATH_LITERAL("CreateNewTemporaryDirInDirTest"), |
1572 &new_dir, | 1572 &new_dir)); |
1573 false)); | |
1574 EXPECT_TRUE(file_util::PathExists(new_dir)); | 1573 EXPECT_TRUE(file_util::PathExists(new_dir)); |
1575 EXPECT_TRUE(test_dir_.IsParent(new_dir)); | 1574 EXPECT_TRUE(test_dir_.IsParent(new_dir)); |
1576 EXPECT_TRUE(file_util::Delete(new_dir, false)); | 1575 EXPECT_TRUE(file_util::Delete(new_dir, false)); |
1577 } | 1576 } |
1578 | 1577 |
1579 TEST_F(FileUtilTest, GetShmemTempDirTest) { | 1578 TEST_F(FileUtilTest, GetShmemTempDirTest) { |
1580 FilePath dir; | 1579 FilePath dir; |
1581 EXPECT_TRUE(file_util::GetShmemTempDir(&dir)); | 1580 EXPECT_TRUE(file_util::GetShmemTempDir(&dir)); |
1582 EXPECT_TRUE(file_util::DirectoryExists(dir)); | 1581 EXPECT_TRUE(file_util::DirectoryExists(dir)); |
1583 } | 1582 } |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); | 1848 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); |
1850 | 1849 |
1851 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt"))); | 1850 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt"))); |
1852 std::string bar("baz"); | 1851 std::string bar("baz"); |
1853 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); | 1852 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); |
1854 | 1853 |
1855 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); | 1854 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); |
1856 } | 1855 } |
1857 | 1856 |
1858 } // namespace | 1857 } // namespace |
OLD | NEW |