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 #include <sys/stat.h> | 11 #include <sys/stat.h> |
12 #include <sys/types.h> | 12 #include <sys/types.h> |
13 | 13 |
14 #include "nacl_mounts/kernel_intercept.h" | 14 #include "nacl_io/kernel_intercept.h" |
15 #include "nacl_mounts/mount_http.h" | 15 #include "nacl_io/mount_http.h" |
16 #include "nacl_mounts/mount_node_dir.h" | 16 #include "nacl_io/mount_node_dir.h" |
17 #include "nacl_mounts/osdirent.h" | 17 #include "nacl_io/osdirent.h" |
18 #include "pepper_interface_mock.h" | 18 #include "pepper_interface_mock.h" |
19 | 19 |
20 using ::testing::_; | 20 using ::testing::_; |
21 using ::testing::DoAll; | 21 using ::testing::DoAll; |
22 using ::testing::Return; | 22 using ::testing::Return; |
23 using ::testing::SetArgPointee; | 23 using ::testing::SetArgPointee; |
24 using ::testing::StrEq; | 24 using ::testing::StrEq; |
25 | 25 |
26 class MountHttpTest : public ::testing::Test { | 26 class MountHttpTest : public ::testing::Test { |
27 public: | 27 public: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 EXPECT_FALSE(foo->GetStat(&sfoo)); | 91 EXPECT_FALSE(foo->GetStat(&sfoo)); |
92 EXPECT_FALSE(bar->GetStat(&sbar)); | 92 EXPECT_FALSE(bar->GetStat(&sbar)); |
93 | 93 |
94 EXPECT_EQ(123, sfoo.st_size); | 94 EXPECT_EQ(123, sfoo.st_size); |
95 EXPECT_EQ(S_IFREG | S_IREAD, sfoo.st_mode); | 95 EXPECT_EQ(S_IFREG | S_IREAD, sfoo.st_mode); |
96 | 96 |
97 EXPECT_EQ(234, sbar.st_size); | 97 EXPECT_EQ(234, sbar.st_size); |
98 EXPECT_EQ(S_IFREG | S_IREAD | S_IWRITE, sbar.st_mode); | 98 EXPECT_EQ(S_IFREG | S_IREAD | S_IWRITE, sbar.st_mode); |
99 } | 99 } |
OLD | NEW |