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 <fcntl.h> | 6 #include <fcntl.h> |
7 #include <gmock/gmock.h> | 7 #include <gmock/gmock.h> |
8 #include <ppapi/c/ppb_file_io.h> | 8 #include <ppapi/c/ppb_file_io.h> |
9 #include <ppapi/c/pp_errors.h> | 9 #include <ppapi/c/pp_errors.h> |
10 #include <ppapi/c/pp_instance.h> | 10 #include <ppapi/c/pp_instance.h> |
11 | 11 |
12 #include "nacl_mounts/mount_html5fs.h" | 12 #include "nacl_io/mount_html5fs.h" |
13 #include "nacl_mounts/osdirent.h" | 13 #include "nacl_io/osdirent.h" |
14 #include "pepper_interface_mock.h" | 14 #include "pepper_interface_mock.h" |
15 | 15 |
16 using ::testing::_; | 16 using ::testing::_; |
17 using ::testing::DoAll; | 17 using ::testing::DoAll; |
18 using ::testing::Return; | 18 using ::testing::Return; |
19 using ::testing::SetArgPointee; | 19 using ::testing::SetArgPointee; |
20 using ::testing::StrEq; | 20 using ::testing::StrEq; |
21 | 21 |
22 namespace { | 22 namespace { |
23 | 23 |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 EXPECT_CALL(*ppapi_, ReleaseResource(dir_reader_resource)); | 348 EXPECT_CALL(*ppapi_, ReleaseResource(dir_reader_resource)); |
349 | 349 |
350 struct dirent dirents[2]; | 350 struct dirent dirents[2]; |
351 memset(&dirents[0], 0, sizeof(dirents)); | 351 memset(&dirents[0], 0, sizeof(dirents)); |
352 int result = node_->GetDents(0, &dirents[0], sizeof(dirent) * 2); | 352 int result = node_->GetDents(0, &dirents[0], sizeof(dirent) * 2); |
353 | 353 |
354 EXPECT_EQ(0, result); | 354 EXPECT_EQ(0, result); |
355 EXPECT_STREQ(&fileref_name_cstr_1[0], &dirents[0].d_name[0]); | 355 EXPECT_STREQ(&fileref_name_cstr_1[0], &dirents[0].d_name[0]); |
356 EXPECT_STREQ(&fileref_name_cstr_2[0], &dirents[1].d_name[0]); | 356 EXPECT_STREQ(&fileref_name_cstr_2[0], &dirents[1].d_name[0]); |
357 } | 357 } |
OLD | NEW |