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

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

Issue 830593003: Update mojo sdk to rev 9fbbc4f0fef1187312316c0ed992342474e139f1 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cherry-pick mojo 9d3b8dd17f12d20035a14737fdc38dd926890ff8 Created 5 years, 11 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 | « extensions/browser/mojo/stash_backend_unittest.cc ('k') | mojo/android/BUILD.gn » ('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 "ipc/mojo/async_handle_waiter.h" 5 #include "ipc/mojo/async_handle_waiter.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/threading/thread.h" 10 #include "base/threading/thread.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 void WaitAndAssertSignaledAndMessageIsArrived() { 66 void WaitAndAssertSignaledAndMessageIsArrived() {
67 run_loop_->Run(); 67 run_loop_->Run();
68 EXPECT_EQ(MOJO_RESULT_OK, signaled_result_); 68 EXPECT_EQ(MOJO_RESULT_OK, signaled_result_);
69 69
70 ReadOneByteOfX(pipe_to_read_.get().value()); 70 ReadOneByteOfX(pipe_to_read_.get().value());
71 } 71 }
72 72
73 void WaitAndAssertNotSignaled() { 73 void WaitAndAssertNotSignaled() {
74 run_loop_->RunUntilIdle(); 74 run_loop_->RunUntilIdle();
75 EXPECT_EQ(MOJO_RESULT_OK, MojoWait(pipe_to_read_.get().value(), 75 EXPECT_EQ(MOJO_RESULT_OK, MojoWait(pipe_to_read_.get().value(),
76 MOJO_HANDLE_SIGNAL_READABLE, 0)); 76 MOJO_HANDLE_SIGNAL_READABLE, 0,
77 nullptr));
77 EXPECT_EQ(MOJO_RESULT_UNKNOWN, signaled_result_); 78 EXPECT_EQ(MOJO_RESULT_UNKNOWN, signaled_result_);
78 } 79 }
79 80
80 void HandleIsReady(MojoResult result) { 81 void HandleIsReady(MojoResult result) {
81 CHECK_EQ(base::MessageLoop::current(), message_loop_.get()); 82 CHECK_EQ(base::MessageLoop::current(), message_loop_.get());
82 CHECK_EQ(signaled_result_, MOJO_RESULT_UNKNOWN); 83 CHECK_EQ(signaled_result_, MOJO_RESULT_UNKNOWN);
83 signaled_result_ = result; 84 signaled_result_ = result;
84 run_loop_->Quit(); 85 run_loop_->Quit();
85 } 86 }
86 87
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 200
200 EXPECT_TRUE(handler.IsClosingHandled()); 201 EXPECT_TRUE(handler.IsClosingHandled());
201 202
202 // |HandlerThatReenters::RestartAndClose| already closed it. 203 // |HandlerThatReenters::RestartAndClose| already closed it.
203 ignore_result(pipe_to_read_.release()); 204 ignore_result(pipe_to_read_.release());
204 } 205 }
205 206
206 } // namespace 207 } // namespace
207 } // namespace internal 208 } // namespace internal
208 } // namespace IPC 209 } // namespace IPC
OLDNEW
« no previous file with comments | « extensions/browser/mojo/stash_backend_unittest.cc ('k') | mojo/android/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698