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 "base/file_util.h" | |
6 #include "base/files/file.h" | 5 #include "base/files/file.h" |
| 6 #include "base/files/file_util.h" |
7 #include "base/files/scoped_temp_dir.h" | 7 #include "base/files/scoped_temp_dir.h" |
8 #include "base/time/time.h" | 8 #include "base/time/time.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 using base::File; | 11 using base::File; |
12 using base::FilePath; | 12 using base::FilePath; |
13 | 13 |
14 TEST(FileTest, Create) { | 14 TEST(FileTest, Create) { |
15 base::ScopedTempDir temp_dir; | 15 base::ScopedTempDir temp_dir; |
16 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); | 16 ASSERT_TRUE(temp_dir.CreateUniqueTempDir()); |
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 NULL)); | 459 NULL)); |
460 ASSERT_TRUE(dir.IsValid()); | 460 ASSERT_TRUE(dir.IsValid()); |
461 | 461 |
462 base::File::Info info; | 462 base::File::Info info; |
463 EXPECT_TRUE(dir.GetInfo(&info)); | 463 EXPECT_TRUE(dir.GetInfo(&info)); |
464 EXPECT_TRUE(info.is_directory); | 464 EXPECT_TRUE(info.is_directory); |
465 EXPECT_FALSE(info.is_symbolic_link); | 465 EXPECT_FALSE(info.is_symbolic_link); |
466 EXPECT_EQ(0, info.size); | 466 EXPECT_EQ(0, info.size); |
467 } | 467 } |
468 #endif // defined(OS_WIN) | 468 #endif // defined(OS_WIN) |
OLD | NEW |