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

Side by Side Diff: ipc/mojo/ipc_mojo_bootstrap_unittest.cc

Issue 1914143004: Re-enable multi-process IPC tests on Android. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo-android-tests
Patch Set: Rebase for commit. Created 4 years, 7 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/ipc_test_base.cc ('k') | ipc/run_all_unittests.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ipc/mojo/ipc_mojo_bootstrap.h" 5 #include "ipc/mojo/ipc_mojo_bootstrap.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/base_paths.h" 10 #include "base/base_paths.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 IPC::mojom::ChannelAssociatedRequest receive_channel, 52 IPC::mojom::ChannelAssociatedRequest receive_channel,
53 int32_t peer_pid) { 53 int32_t peer_pid) {
54 passed_ = true; 54 passed_ = true;
55 quit_callback_.Run(); 55 quit_callback_.Run();
56 } 56 }
57 57
58 void TestingDelegate::OnBootstrapError() { 58 void TestingDelegate::OnBootstrapError() {
59 quit_callback_.Run(); 59 quit_callback_.Run();
60 } 60 }
61 61
62 // Times out on Android; see http://crbug.com/502290 62 TEST_F(IPCMojoBootstrapTest, Connect) {
63 #if defined(OS_ANDROID)
64 #define MAYBE_Connect DISABLED_Connect
65 #else
66 #define MAYBE_Connect Connect
67 #endif
68 TEST_F(IPCMojoBootstrapTest, MAYBE_Connect) {
69 base::MessageLoop message_loop; 63 base::MessageLoop message_loop;
70 base::RunLoop run_loop; 64 base::RunLoop run_loop;
71 TestingDelegate delegate(run_loop.QuitClosure()); 65 TestingDelegate delegate(run_loop.QuitClosure());
72 std::unique_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create( 66 std::unique_ptr<IPC::MojoBootstrap> bootstrap = IPC::MojoBootstrap::Create(
73 helper_.StartChild("IPCMojoBootstrapTestClient"), 67 helper_.StartChild("IPCMojoBootstrapTestClient"),
74 IPC::Channel::MODE_SERVER, &delegate); 68 IPC::Channel::MODE_SERVER, &delegate);
75 69
76 bootstrap->Connect(); 70 bootstrap->Connect();
77 run_loop.Run(); 71 run_loop.Run();
78 72
(...skipping 14 matching lines...) Expand all
93 IPC::Channel::MODE_CLIENT, &delegate); 87 IPC::Channel::MODE_CLIENT, &delegate);
94 88
95 bootstrap->Connect(); 89 bootstrap->Connect();
96 90
97 run_loop.Run(); 91 run_loop.Run();
98 92
99 return delegate.passed() ? 0 : 1; 93 return delegate.passed() ? 0 : 1;
100 } 94 }
101 95
102 } // namespace 96 } // namespace
OLDNEW
« no previous file with comments | « ipc/ipc_test_base.cc ('k') | ipc/run_all_unittests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698