| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 <string> | 5 #include <string> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "gtest/gtest.h" | 8 #include "gtest/gtest.h" |
| 9 #include "kernel_proxy_mock.h" | 9 #include "kernel_proxy_mock.h" |
| 10 #include "nacl_io/kernel_intercept.h" | 10 #include "nacl_io/kernel_intercept.h" |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 mount(StrEq("mount1"), StrEq("mount2"), StrEq("mount3"), 2345, NULL)) | 245 mount(StrEq("mount1"), StrEq("mount2"), StrEq("mount3"), 2345, NULL)) |
| 246 .Times(1); | 246 .Times(1); |
| 247 mount("mount1", "mount2", "mount3", 2345, NULL); | 247 mount("mount1", "mount2", "mount3", 2345, NULL); |
| 248 } | 248 } |
| 249 | 249 |
| 250 TEST_F(KernelWrapTest, open) { | 250 TEST_F(KernelWrapTest, open) { |
| 251 EXPECT_CALL(mock, open(StrEq("open"), 3456)).Times(1); | 251 EXPECT_CALL(mock, open(StrEq("open"), 3456)).Times(1); |
| 252 open("open", 3456); | 252 open("open", 3456); |
| 253 } | 253 } |
| 254 | 254 |
| 255 TEST_F(KernelWrapTest, pipe) { |
| 256 int fds[2] = { 1, 2 }; |
| 257 |
| 258 EXPECT_CALL(mock, pipe(fds)).Times(1); |
| 259 pipe(fds); |
| 260 } |
| 261 |
| 255 TEST_F(KernelWrapTest, read) { | 262 TEST_F(KernelWrapTest, read) { |
| 256 EXPECT_CALL(mock, read(4567, NULL, 5678)).Times(1); | 263 EXPECT_CALL(mock, read(4567, NULL, 5678)).Times(1); |
| 257 read(4567, NULL, 5678); | 264 read(4567, NULL, 5678); |
| 258 } | 265 } |
| 259 | 266 |
| 260 #ifdef __GLIBC__ | 267 #ifdef __GLIBC__ |
| 261 TEST_F(KernelWrapTest, remove) { | 268 TEST_F(KernelWrapTest, remove) { |
| 262 EXPECT_CALL(mock, remove(StrEq("remove"))).Times(1); | 269 EXPECT_CALL(mock, remove(StrEq("remove"))).Times(1); |
| 263 remove("remove"); | 270 remove("remove"); |
| 264 } | 271 } |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 EXPECT_CALL(mock, socket(DUMMY_FD, 456, 789)).Times(1); | 429 EXPECT_CALL(mock, socket(DUMMY_FD, 456, 789)).Times(1); |
| 423 socket(DUMMY_FD, 456, 789); | 430 socket(DUMMY_FD, 456, 789); |
| 424 } | 431 } |
| 425 | 432 |
| 426 TEST_F(KernelWrapTest, socketpair) { | 433 TEST_F(KernelWrapTest, socketpair) { |
| 427 EXPECT_CALL(mock, socketpair(DUMMY_FD, 456, 789, NULL)).Times(1); | 434 EXPECT_CALL(mock, socketpair(DUMMY_FD, 456, 789, NULL)).Times(1); |
| 428 socketpair(DUMMY_FD, 456, 789, NULL); | 435 socketpair(DUMMY_FD, 456, 789, NULL); |
| 429 } | 436 } |
| 430 | 437 |
| 431 #endif // PROVIDES_SOCKET_API | 438 #endif // PROVIDES_SOCKET_API |
| OLD | NEW |