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

Side by Side Diff: mojo/edk/system/ipc_support_unittest.cc

Issue 1420713006: Revert "EDK: Move //mojo/edk/system/waitable_event* to edk/util." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 1 month 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
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 "mojo/edk/system/ipc_support.h" 5 #include "mojo/edk/system/ipc_support.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/bind.h" 11 #include "base/bind.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "mojo/edk/embedder/master_process_delegate.h" 13 #include "mojo/edk/embedder/master_process_delegate.h"
14 #include "mojo/edk/embedder/platform_channel_pair.h" 14 #include "mojo/edk/embedder/platform_channel_pair.h"
15 #include "mojo/edk/embedder/simple_platform_support.h" 15 #include "mojo/edk/embedder/simple_platform_support.h"
16 #include "mojo/edk/embedder/slave_process_delegate.h" 16 #include "mojo/edk/embedder/slave_process_delegate.h"
17 #include "mojo/edk/system/channel_manager.h" 17 #include "mojo/edk/system/channel_manager.h"
18 #include "mojo/edk/system/connection_identifier.h" 18 #include "mojo/edk/system/connection_identifier.h"
19 #include "mojo/edk/system/dispatcher.h" 19 #include "mojo/edk/system/dispatcher.h"
20 #include "mojo/edk/system/message_pipe.h" 20 #include "mojo/edk/system/message_pipe.h"
21 #include "mojo/edk/system/message_pipe_dispatcher.h" 21 #include "mojo/edk/system/message_pipe_dispatcher.h"
22 #include "mojo/edk/system/process_identifier.h" 22 #include "mojo/edk/system/process_identifier.h"
23 #include "mojo/edk/system/test/test_command_line.h" 23 #include "mojo/edk/system/test/test_command_line.h"
24 #include "mojo/edk/system/test/test_io_thread.h" 24 #include "mojo/edk/system/test/test_io_thread.h"
25 #include "mojo/edk/system/test/timeouts.h" 25 #include "mojo/edk/system/test/timeouts.h"
26 #include "mojo/edk/system/waitable_event.h"
26 #include "mojo/edk/system/waiter.h" 27 #include "mojo/edk/system/waiter.h"
27 #include "mojo/edk/test/multiprocess_test_helper.h" 28 #include "mojo/edk/test/multiprocess_test_helper.h"
28 #include "mojo/edk/test/test_utils.h" 29 #include "mojo/edk/test/test_utils.h"
29 #include "mojo/edk/util/command_line.h" 30 #include "mojo/edk/util/command_line.h"
30 #include "mojo/edk/util/waitable_event.h"
31 #include "mojo/public/cpp/system/macros.h" 31 #include "mojo/public/cpp/system/macros.h"
32 #include "testing/gtest/include/gtest/gtest.h" 32 #include "testing/gtest/include/gtest/gtest.h"
33 33
34 using mojo::util::AutoResetWaitableEvent;
35 using mojo::util::ManualResetWaitableEvent;
36 using mojo::util::RefPtr; 34 using mojo::util::RefPtr;
37 35
38 namespace mojo { 36 namespace mojo {
39 namespace system { 37 namespace system {
40 namespace { 38 namespace {
41 39
42 const char kConnectionIdFlag[] = "test-connection-id"; 40 const char kConnectionIdFlag[] = "test-connection-id";
43 41
44 // Tests writing a message (containing just data) to |write_mp| and then reading 42 // Tests writing a message (containing just data) to |write_mp| and then reading
45 // it from |read_mp| (it should be the next message, i.e., there should be no 43 // it from |read_mp| (it should be the next message, i.e., there should be no
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
709 707
710 test_io_thread.PostTaskAndWait(base::Bind(&IPCSupport::ShutdownOnIOThread, 708 test_io_thread.PostTaskAndWait(base::Bind(&IPCSupport::ShutdownOnIOThread,
711 base::Unretained(&ipc_support))); 709 base::Unretained(&ipc_support)));
712 } 710 }
713 711
714 // TODO(vtl): Also test the case of the master "dying" before the slave. (The 712 // TODO(vtl): Also test the case of the master "dying" before the slave. (The
715 // slave should get OnMasterDisconnect(), which we currently don't test.) 713 // slave should get OnMasterDisconnect(), which we currently don't test.)
716 714
717 } // namespace system 715 } // namespace system
718 } // namespace mojo 716 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/endpoint_relayer_unittest.cc ('k') | mojo/edk/system/master_connection_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698