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> |
11 #include <shlobj.h> | 11 #include <shlobj.h> |
12 #include <tchar.h> | 12 #include <tchar.h> |
13 #endif | 13 #endif |
14 | 14 |
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/logging.h" | |
22 #include "base/path_service.h" | 21 #include "base/path_service.h" |
23 #include "base/platform_thread.h" | 22 #include "base/platform_thread.h" |
24 #include "base/scoped_handle.h" | 23 #include "base/scoped_handle.h" |
25 #include "base/time.h" | 24 #include "base/time.h" |
26 #include "base/utf_string_conversions.h" | 25 #include "base/utf_string_conversions.h" |
27 #include "testing/gtest/include/gtest/gtest.h" | 26 #include "testing/gtest/include/gtest/gtest.h" |
28 #include "testing/platform_test.h" | 27 #include "testing/platform_test.h" |
29 | 28 |
30 // This macro helps avoid wrapped lines in the test structs. | 29 // This macro helps avoid wrapped lines in the test structs. |
31 #define FPL(x) FILE_PATH_LITERAL(x) | 30 #define FPL(x) FILE_PATH_LITERAL(x) |
(...skipping 1761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1793 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); | 1792 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); |
1794 | 1793 |
1795 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt"))); | 1794 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt"))); |
1796 std::string bar("baz"); | 1795 std::string bar("baz"); |
1797 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); | 1796 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); |
1798 | 1797 |
1799 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); | 1798 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); |
1800 } | 1799 } |
1801 | 1800 |
1802 } // namespace | 1801 } // namespace |
OLD | NEW |