| 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 #include "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "sandbox/src/crosscall_client.h" | 6 #include "sandbox/win/src/crosscall_client.h" |
| 7 #include "sandbox/src/crosscall_server.h" | 7 #include "sandbox/win/src/crosscall_server.h" |
| 8 #include "sandbox/src/sharedmem_ipc_client.h" | 8 #include "sandbox/win/src/sharedmem_ipc_client.h" |
| 9 #include "sandbox/src/sharedmem_ipc_server.h" | 9 #include "sandbox/win/src/sharedmem_ipc_server.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 11 |
| 12 namespace sandbox { | 12 namespace sandbox { |
| 13 | 13 |
| 14 // Helper function to make the fake shared memory with some | 14 // Helper function to make the fake shared memory with some |
| 15 // basic elements initialized. | 15 // basic elements initialized. |
| 16 IPCControl* MakeChannels(size_t channel_size, size_t total_shared_size, | 16 IPCControl* MakeChannels(size_t channel_size, size_t total_shared_size, |
| 17 size_t* base_start) { | 17 size_t* base_start) { |
| 18 // Allocate memory | 18 // Allocate memory |
| 19 char* mem = new char[total_shared_size]; | 19 char* mem = new char[total_shared_size]; |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 &call_return)); | 632 &call_return)); |
| 633 EXPECT_EQ(SBOX_ALL_OK, call_return.call_outcome); | 633 EXPECT_EQ(SBOX_ALL_OK, call_return.call_outcome); |
| 634 EXPECT_TRUE(bar == call_return.extended[0].handle); | 634 EXPECT_TRUE(bar == call_return.extended[0].handle); |
| 635 EXPECT_EQ(foo, call_return.extended[1].unsigned_int); | 635 EXPECT_EQ(foo, call_return.extended[1].unsigned_int); |
| 636 | 636 |
| 637 CloseChannelEvents(client_control); | 637 CloseChannelEvents(client_control); |
| 638 delete[] reinterpret_cast<char*>(client_control); | 638 delete[] reinterpret_cast<char*>(client_control); |
| 639 } | 639 } |
| 640 | 640 |
| 641 } // namespace sandbox | 641 } // namespace sandbox |
| OLD | NEW |