| 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/files/dir_reader_posix.h" | 5 #include "base/files/dir_reader_posix.h" |
| 6 | 6 |
| 7 #include <fcntl.h> | 7 #include <fcntl.h> |
| 8 #include <stdio.h> | 8 #include <stdio.h> |
| 9 #include <stdlib.h> | 9 #include <stdlib.h> |
| 10 #include <string.h> | 10 #include <string.h> |
| 11 #include <unistd.h> | 11 #include <unistd.h> |
| 12 | 12 |
| 13 #include "base/files/scoped_temp_dir.h" | 13 #include "base/files/scoped_temp_dir.h" |
| 14 #include "base/logging.h" | 14 #include "base/logging.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/googletest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 #if defined(OS_ANDROID) | 17 #if defined(OS_ANDROID) |
| 18 #include "base/os_compat_android.h" | 18 #include "base/os_compat_android.h" |
| 19 #endif | 19 #endif |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 | 22 |
| 23 TEST(DirReaderPosixUnittest, Read) { | 23 TEST(DirReaderPosixUnittest, Read) { |
| 24 static const unsigned kNumFiles = 100; | 24 static const unsigned kNumFiles = 100; |
| 25 | 25 |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 PCHECK(fchdir(prev_wd) == 0); | 86 PCHECK(fchdir(prev_wd) == 0); |
| 87 PCHECK(close(prev_wd) == 0); | 87 PCHECK(close(prev_wd) == 0); |
| 88 | 88 |
| 89 EXPECT_TRUE(seen_dot); | 89 EXPECT_TRUE(seen_dot); |
| 90 EXPECT_TRUE(seen_dotdot); | 90 EXPECT_TRUE(seen_dotdot); |
| 91 EXPECT_EQ(kNumFiles, seen.size()); | 91 EXPECT_EQ(kNumFiles, seen.size()); |
| 92 } | 92 } |
| 93 | 93 |
| 94 } // namespace base | 94 } // namespace base |
| OLD | NEW |