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

Side by Side Diff: mojo/system/dispatcher_unittest.cc

Issue 414393002: Convert verification of options structs to use the new user pointer handling (see r285350). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: temporarily disable part of OptionsValidationTest.InvalidDeath Created 6 years, 4 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/system/dispatcher.cc ('k') | mojo/system/local_data_pipe_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 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
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
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
OLDNEW
« no previous file with comments | « mojo/system/dispatcher.cc ('k') | mojo/system/local_data_pipe_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698