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 | 5 |
6 #include <errno.h> | 6 #include <errno.h> |
7 #include <fcntl.h> | 7 #include <fcntl.h> |
8 #include <string.h> | 8 #include <string.h> |
9 #include <gmock/gmock.h> | 9 #include <gmock/gmock.h> |
10 #include <ppapi/c/ppb_file_io.h> | 10 #include <ppapi/c/ppb_file_io.h> |
11 #include <ppapi/c/pp_directory_entry.h> | 11 #include <ppapi/c/pp_directory_entry.h> |
12 #include <ppapi/c/pp_errors.h> | 12 #include <ppapi/c/pp_errors.h> |
13 #include <ppapi/c/pp_instance.h> | 13 #include <ppapi/c/pp_instance.h> |
14 #if defined(WIN32) | 14 #if defined(WIN32) |
15 #include <windows.h> // For Sleep() | 15 #include <windows.h> // For Sleep() |
16 #endif | 16 #endif |
17 | 17 |
18 #include "mock_util.h" | 18 #include "mock_util.h" |
19 #include "nacl_io/mount_html5fs.h" | 19 #include "nacl_io/mount_html5fs.h" |
20 #include "nacl_io/osdirent.h" | 20 #include "nacl_io/osdirent.h" |
21 #include "nacl_io/osunistd.h" | 21 #include "nacl_io/osunistd.h" |
22 #include "pepper_interface_mock.h" | 22 #include "pepper_interface_mock.h" |
23 | 23 |
| 24 using namespace nacl_io; |
| 25 using namespace sdk_util; |
| 26 |
24 using ::testing::_; | 27 using ::testing::_; |
25 using ::testing::DoAll; | 28 using ::testing::DoAll; |
26 using ::testing::Invoke; | 29 using ::testing::Invoke; |
27 using ::testing::Return; | 30 using ::testing::Return; |
28 using ::testing::SaveArg; | 31 using ::testing::SaveArg; |
29 using ::testing::SetArgPointee; | 32 using ::testing::SetArgPointee; |
30 using ::testing::StrEq; | 33 using ::testing::StrEq; |
31 using ::testing::WithArgs; | 34 using ::testing::WithArgs; |
32 | 35 |
33 namespace { | 36 namespace { |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 EXPECT_LT(0, dirents[0].d_ino); // 0 is an invalid inode number. | 621 EXPECT_LT(0, dirents[0].d_ino); // 0 is an invalid inode number. |
619 EXPECT_EQ(sizeof(dirent), dirents[0].d_off); | 622 EXPECT_EQ(sizeof(dirent), dirents[0].d_off); |
620 EXPECT_EQ(sizeof(dirent), dirents[0].d_reclen); | 623 EXPECT_EQ(sizeof(dirent), dirents[0].d_reclen); |
621 EXPECT_STREQ(fileref_name_cstr_1, dirents[0].d_name); | 624 EXPECT_STREQ(fileref_name_cstr_1, dirents[0].d_name); |
622 EXPECT_LT(0, dirents[1].d_ino); // 0 is an invalid inode number. | 625 EXPECT_LT(0, dirents[1].d_ino); // 0 is an invalid inode number. |
623 EXPECT_EQ(sizeof(dirent), dirents[1].d_off); | 626 EXPECT_EQ(sizeof(dirent), dirents[1].d_off); |
624 EXPECT_EQ(sizeof(dirent), dirents[1].d_reclen); | 627 EXPECT_EQ(sizeof(dirent), dirents[1].d_reclen); |
625 EXPECT_STREQ(fileref_name_cstr_2, dirents[1].d_name); | 628 EXPECT_STREQ(fileref_name_cstr_2, dirents[1].d_name); |
626 } | 629 } |
627 | 630 |
OLD | NEW |