OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/system/dispatcher.h" | 5 #include "mojo/system/dispatcher.h" |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 NullUserPointer(), | 188 NullUserPointer(), |
189 MOJO_READ_DATA_FLAG_NONE)); | 189 MOJO_READ_DATA_FLAG_NONE)); |
190 break; | 190 break; |
191 case END_READ_DATA: | 191 case END_READ_DATA: |
192 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, | 192 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, |
193 dispatcher_->EndReadData(0)); | 193 dispatcher_->EndReadData(0)); |
194 break; | 194 break; |
195 case DUPLICATE_BUFFER_HANDLE: { | 195 case DUPLICATE_BUFFER_HANDLE: { |
196 scoped_refptr<Dispatcher> unused; | 196 scoped_refptr<Dispatcher> unused; |
197 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, | 197 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, |
198 dispatcher_->DuplicateBufferHandle(NULL, &unused)); | 198 dispatcher_->DuplicateBufferHandle(NullUserPointer(), |
| 199 &unused)); |
199 break; | 200 break; |
200 } | 201 } |
201 case MAP_BUFFER: { | 202 case MAP_BUFFER: { |
202 scoped_ptr<RawSharedBufferMapping> unused; | 203 scoped_ptr<RawSharedBufferMapping> unused; |
203 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, | 204 EXPECT_EQ(MOJO_RESULT_INVALID_ARGUMENT, |
204 dispatcher_->MapBuffer(0u, 0u, MOJO_MAP_BUFFER_FLAG_NONE, | 205 dispatcher_->MapBuffer(0u, 0u, MOJO_MAP_BUFFER_FLAG_NONE, |
205 &unused)); | 206 &unused)); |
206 break; | 207 break; |
207 } | 208 } |
208 case ADD_WAITER: { | 209 case ADD_WAITER: { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 event.Signal(); // Kicks off real work on the threads. | 281 event.Signal(); // Kicks off real work on the threads. |
281 } // Joins all the threads. | 282 } // Joins all the threads. |
282 | 283 |
283 EXPECT_EQ(MOJO_RESULT_OK, d->Close()); | 284 EXPECT_EQ(MOJO_RESULT_OK, d->Close()); |
284 } | 285 } |
285 } | 286 } |
286 | 287 |
287 } // namespace | 288 } // namespace |
288 } // namespace system | 289 } // namespace system |
289 } // namespace mojo | 290 } // namespace mojo |
OLD | NEW |