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

Side by Side Diff: mojo/public/cpp/environment/tests/async_waiter_unittest.cc

Issue 345463003: Mojo: MojoWaitFlags -> MojoHandleSignals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « mojo/public/cpp/environment/lib/default_async_waiter.cc ('k') | mojo/public/cpp/system/core.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 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 <string> 5 #include <string>
6 6
7 #include "mojo/public/cpp/environment/default_async_waiter.h" 7 #include "mojo/public/cpp/environment/default_async_waiter.h"
8 #include "mojo/public/cpp/environment/environment.h" 8 #include "mojo/public/cpp/environment/environment.h"
9 #include "mojo/public/cpp/system/core.h" 9 #include "mojo/public/cpp/system/core.h"
10 #include "mojo/public/cpp/system/macros.h" 10 #include "mojo/public/cpp/system/macros.h"
(...skipping 22 matching lines...) Expand all
33 } 33 }
34 34
35 private: 35 private:
36 int result_count_; 36 int result_count_;
37 MojoResult last_result_; 37 MojoResult last_result_;
38 38
39 MOJO_DISALLOW_COPY_AND_ASSIGN(TestAsyncWaitCallback); 39 MOJO_DISALLOW_COPY_AND_ASSIGN(TestAsyncWaitCallback);
40 }; 40 };
41 41
42 MojoAsyncWaitID CallAsyncWait(const Handle& handle, 42 MojoAsyncWaitID CallAsyncWait(const Handle& handle,
43 MojoWaitFlags flags, 43 MojoHandleSignals signals,
44 TestAsyncWaitCallback* callback) { 44 TestAsyncWaitCallback* callback) {
45 return GetDefaultAsyncWaiter()->AsyncWait( 45 return GetDefaultAsyncWaiter()->AsyncWait(
46 handle.value(), 46 handle.value(),
47 flags, 47 signals,
48 MOJO_DEADLINE_INDEFINITE, 48 MOJO_DEADLINE_INDEFINITE,
49 &TestAsyncWaitCallback::OnHandleReady, 49 &TestAsyncWaitCallback::OnHandleReady,
50 callback); 50 callback);
51 } 51 }
52 52
53 void CallCancelWait(MojoAsyncWaitID wait_id) { 53 void CallCancelWait(MojoAsyncWaitID wait_id) {
54 GetDefaultAsyncWaiter()->CancelWait(wait_id); 54 GetDefaultAsyncWaiter()->CancelWait(wait_id);
55 } 55 }
56 56
57 class AsyncWaiterTest : public testing::Test { 57 class AsyncWaiterTest : public testing::Test {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 CallCancelWait( 107 CallCancelWait(
108 CallAsyncWait(test_pipe.handle0.get(), 108 CallAsyncWait(test_pipe.handle0.get(),
109 MOJO_WAIT_FLAG_READABLE, 109 MOJO_WAIT_FLAG_READABLE,
110 &callback)); 110 &callback));
111 RunLoop::current()->Run(); 111 RunLoop::current()->Run();
112 EXPECT_EQ(0, callback.result_count()); 112 EXPECT_EQ(0, callback.result_count());
113 } 113 }
114 114
115 } // namespace 115 } // namespace
116 } // namespace mojo 116 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/cpp/environment/lib/default_async_waiter.cc ('k') | mojo/public/cpp/system/core.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698