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

Side by Side Diff: ipc/attachment_broker_privileged_win_unittest.cc

Issue 1397023002: ipc: Write end-to-end tests for SharedMemoryHandle brokering on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More Win compile errors. Created 5 years, 2 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
« no previous file with comments | « ipc/attachment_broker_mac_unittest.cc ('k') | ipc/handle_win.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/file_util.h" 10 #include "base/files/file_util.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 219
220 // Takes ownership of |broker|. Has no effect if called after CommonSetUp(). 220 // Takes ownership of |broker|. Has no effect if called after CommonSetUp().
221 void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) { 221 void set_broker(IPC::AttachmentBrokerUnprivilegedWin* broker) {
222 broker_.reset(broker); 222 broker_.reset(broker);
223 } 223 }
224 224
225 void CommonSetUp() { 225 void CommonSetUp() {
226 if (!broker_.get()) 226 if (!broker_.get())
227 set_broker(new IPC::AttachmentBrokerUnprivilegedWin); 227 set_broker(new IPC::AttachmentBrokerUnprivilegedWin);
228 broker_->AddObserver(&observer_); 228 broker_->AddObserver(&observer_);
229 set_attachment_broker(broker_.get());
230 CreateChannel(&proxy_listener_); 229 CreateChannel(&proxy_listener_);
231 broker_->DesignateBrokerCommunicationChannel(channel()); 230 broker_->DesignateBrokerCommunicationChannel(channel());
232 ASSERT_TRUE(ConnectChannel()); 231 ASSERT_TRUE(ConnectChannel());
233 ASSERT_TRUE(StartClient()); 232 ASSERT_TRUE(StartClient());
234 } 233 }
235 234
236 void CommonTearDown() { 235 void CommonTearDown() {
237 // Close the channel so the client's OnChannelError() gets fired. 236 // Close the channel so the client's OnChannelError() gets fired.
238 channel()->Close(); 237 channel()->Close();
239 238
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 SendControlMessage(sender, success); 552 SendControlMessage(sender, success);
554 } 553 }
555 } 554 }
556 555
557 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendHandleTwice) { 556 MULTIPROCESS_IPC_TEST_CLIENT_MAIN(SendHandleTwice) {
558 return CommonPrivilegedProcessMain(&SendHandleTwiceCallback, 557 return CommonPrivilegedProcessMain(&SendHandleTwiceCallback,
559 "SendHandleTwice"); 558 "SendHandleTwice");
560 } 559 }
561 560
562 } // namespace 561 } // namespace
OLDNEW
« no previous file with comments | « ipc/attachment_broker_mac_unittest.cc ('k') | ipc/handle_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698