Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/kernel_wrap_test.cc

Issue 23498015: [NaCl SDK] Support non blocking TCP/UDP (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698