| 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 TEST_F(KernelWrapTest, remove) { | 267 TEST_F(KernelWrapTest, remove) { |
| 261 EXPECT_CALL(mock, remove(StrEq("remove"))).Times(1); | 268 EXPECT_CALL(mock, remove(StrEq("remove"))).Times(1); |
| 262 remove("remove"); | 269 remove("remove"); |
| 263 } | 270 } |
| 264 | 271 |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 EXPECT_CALL(mock, socket(DUMMY_FD, 456, 789)).Times(1); | 427 EXPECT_CALL(mock, socket(DUMMY_FD, 456, 789)).Times(1); |
| 421 socket(DUMMY_FD, 456, 789); | 428 socket(DUMMY_FD, 456, 789); |
| 422 } | 429 } |
| 423 | 430 |
| 424 TEST_F(KernelWrapTest, socketpair) { | 431 TEST_F(KernelWrapTest, socketpair) { |
| 425 EXPECT_CALL(mock, socketpair(DUMMY_FD, 456, 789, NULL)).Times(1); | 432 EXPECT_CALL(mock, socketpair(DUMMY_FD, 456, 789, NULL)).Times(1); |
| 426 socketpair(DUMMY_FD, 456, 789, NULL); | 433 socketpair(DUMMY_FD, 456, 789, NULL); |
| 427 } | 434 } |
| 428 | 435 |
| 429 #endif // PROVIDES_SOCKET_API | 436 #endif // PROVIDES_SOCKET_API |
| OLD | NEW |