OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "build/build_config.h" | 5 #include "build/build_config.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <tuple> | 10 #include <tuple> |
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 // The parent process acts as an unprivileged process. The forked process acts | 248 // The parent process acts as an unprivileged process. The forked process acts |
249 // as the privileged process. | 249 // as the privileged process. |
250 class IPCAttachmentBrokerPrivilegedWinTest : public IPCTestBase { | 250 class IPCAttachmentBrokerPrivilegedWinTest : public IPCTestBase { |
251 public: | 251 public: |
252 IPCAttachmentBrokerPrivilegedWinTest() {} | 252 IPCAttachmentBrokerPrivilegedWinTest() {} |
253 ~IPCAttachmentBrokerPrivilegedWinTest() override {} | 253 ~IPCAttachmentBrokerPrivilegedWinTest() override {} |
254 | 254 |
255 void SetUp() override { | 255 void SetUp() override { |
256 IPCTestBase::SetUp(); | 256 IPCTestBase::SetUp(); |
257 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 257 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
258 ASSERT_TRUE(base::CreateTemporaryFileInDir(temp_dir_.path(), &temp_path_)); | 258 ASSERT_TRUE( |
| 259 base::CreateTemporaryFileInDir(temp_dir_.GetPath(), &temp_path_)); |
259 } | 260 } |
260 | 261 |
261 void TearDown() override { IPCTestBase::TearDown(); } | 262 void TearDown() override { IPCTestBase::TearDown(); } |
262 | 263 |
263 // Takes ownership of |broker|. Has no effect if called after CommonSetUp(). | 264 // Takes ownership of |broker|. Has no effect if called after CommonSetUp(). |
264 void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) { | 265 void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) { |
265 broker_.reset(broker); | 266 broker_.reset(broker); |
266 } | 267 } |
267 | 268 |
268 void CommonSetUp() { | 269 void CommonSetUp() { |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
658 memcmp(shared_memory->memory(), kDataBuffer, strlen(kDataBuffer)) == 0; | 659 memcmp(shared_memory->memory(), kDataBuffer, strlen(kDataBuffer)) == 0; |
659 SendControlMessage(sender, success); | 660 SendControlMessage(sender, success); |
660 } | 661 } |
661 | 662 |
662 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendSharedMemoryHandle) { | 663 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendSharedMemoryHandle) { |
663 return CommonPrivilegedProcessMain(&SendSharedMemoryHandleCallback, | 664 return CommonPrivilegedProcessMain(&SendSharedMemoryHandleCallback, |
664 "SendSharedMemoryHandle"); | 665 "SendSharedMemoryHandle"); |
665 } | 666 } |
666 | 667 |
667 } // namespace | 668 } // namespace |
OLD | NEW |