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

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

Issue 1389163008: Don't use base::MessageLoop::{Quit,QuitClosure} in extensions/, ipc/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/mojo/ipc_channel_mojo_unittest.cc ('k') | ipc/sync_socket_unittest.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 "base/base_paths.h" 7 #include "base/base_paths.h"
8 #include "base/files/file.h" 8 #include "base/files/file.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "ipc/ipc_test_base.h" 10 #include "ipc/ipc_test_base.h"
(...skipping 19 matching lines...) Expand all
30 bool passed() const { return passed_; } 30 bool passed() const { return passed_; }
31 31
32 private: 32 private:
33 bool passed_; 33 bool passed_;
34 }; 34 };
35 35
36 void TestingDelegate::OnPipeAvailable( 36 void TestingDelegate::OnPipeAvailable(
37 mojo::embedder::ScopedPlatformHandle handle, 37 mojo::embedder::ScopedPlatformHandle handle,
38 int32 peer_pid) { 38 int32 peer_pid) {
39 passed_ = true; 39 passed_ = true;
40 base::MessageLoop::current()->Quit(); 40 base::MessageLoop::current()->QuitWhenIdle();
41 } 41 }
42 42
43 void TestingDelegate::OnBootstrapError() { 43 void TestingDelegate::OnBootstrapError() {
44 base::MessageLoop::current()->Quit(); 44 base::MessageLoop::current()->QuitWhenIdle();
45 } 45 }
46 46
47 // Times out on Android; see http://crbug.com/502290 47 // Times out on Android; see http://crbug.com/502290
48 #if defined(OS_ANDROID) 48 #if defined(OS_ANDROID)
49 #define MAYBE_Connect DISABLED_Connect 49 #define MAYBE_Connect DISABLED_Connect
50 #else 50 #else
51 #define MAYBE_Connect Connect 51 #define MAYBE_Connect Connect
52 #endif 52 #endif
53 TEST_F(IPCMojoBootstrapTest, MAYBE_Connect) { 53 TEST_F(IPCMojoBootstrapTest, MAYBE_Connect) {
54 Init("IPCMojoBootstrapTestClient"); 54 Init("IPCMojoBootstrapTestClient");
(...skipping 27 matching lines...) Expand all
82 bootstrap->Connect(); 82 bootstrap->Connect();
83 83
84 base::MessageLoop::current()->Run(); 84 base::MessageLoop::current()->Run();
85 85
86 EXPECT_TRUE(delegate.passed()); 86 EXPECT_TRUE(delegate.passed());
87 87
88 return 0; 88 return 0;
89 } 89 }
90 90
91 } // namespace 91 } // namespace
OLDNEW
« no previous file with comments | « ipc/mojo/ipc_channel_mojo_unittest.cc ('k') | ipc/sync_socket_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698