| 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 // The linux host build of nacl_io can't do wrapping of syscalls so all |
| 6 // these tests must be disabled. |
| 7 #if !defined(__linux__) |
| 8 |
| 5 #include <unistd.h> | 9 #include <unistd.h> |
| 6 | 10 |
| 7 #include <string> | 11 #include <string> |
| 8 #include <vector> | 12 #include <vector> |
| 9 | 13 |
| 10 #include "gtest/gtest.h" | 14 #include "gtest/gtest.h" |
| 11 #include "kernel_proxy_mock.h" | 15 #include "kernel_proxy_mock.h" |
| 12 #include "nacl_io/kernel_intercept.h" | 16 #include "nacl_io/kernel_intercept.h" |
| 13 #include "nacl_io/kernel_wrap.h" | 17 #include "nacl_io/kernel_wrap.h" |
| 14 #include "nacl_io/osmman.h" | 18 #include "nacl_io/osmman.h" |
| (...skipping 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 707 | 711 |
| 708 TEST_F(KernelWrapTest, socketpair) { | 712 TEST_F(KernelWrapTest, socketpair) { |
| 709 int dummy_val; | 713 int dummy_val; |
| 710 EXPECT_CALL(mock, socketpair(kDummyInt, kDummyInt2, kDummyInt3, &dummy_val)) | 714 EXPECT_CALL(mock, socketpair(kDummyInt, kDummyInt2, kDummyInt3, &dummy_val)) |
| 711 .WillOnce(Return(kDummyInt4)); | 715 .WillOnce(Return(kDummyInt4)); |
| 712 EXPECT_EQ(kDummyInt4, | 716 EXPECT_EQ(kDummyInt4, |
| 713 socketpair(kDummyInt, kDummyInt2, kDummyInt3, &dummy_val)); | 717 socketpair(kDummyInt, kDummyInt2, kDummyInt3, &dummy_val)); |
| 714 } | 718 } |
| 715 | 719 |
| 716 #endif // PROVIDES_SOCKET_API | 720 #endif // PROVIDES_SOCKET_API |
| 721 |
| 722 #endif // __linux__ |
| OLD | NEW |