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

Side by Side Diff: mojo/edk/system/handle_table_unittest.cc

Issue 2012613002: Enforce/require MOJO_HANDLE_RIGHT_TRANSFER in sending handles via MojoWriteMessage(). (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 7 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/edk/system/handle_table.h" 5 #include "mojo/edk/system/handle_table.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "mojo/edk/system/dispatcher.h" 9 #include "mojo/edk/system/dispatcher.h"
10 #include "mojo/edk/system/handle.h" 10 #include "mojo/edk/system/handle.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 240
241 Handle h; 241 Handle h;
242 ASSERT_EQ(MOJO_RESULT_OK, ht.GetAndRemoveHandle(handle_values[i], &h)) << i; 242 ASSERT_EQ(MOJO_RESULT_OK, ht.GetAndRemoveHandle(handle_values[i], &h)) << i;
243 ASSERT_EQ(handles[i], h) << i; 243 ASSERT_EQ(handles[i], h) << i;
244 } 244 }
245 245
246 for (size_t i = 0u; i < kNumHandles; i++) 246 for (size_t i = 0u; i < kNumHandles; i++)
247 EXPECT_EQ(MOJO_RESULT_OK, handles[i].dispatcher->Close()) << i; 247 EXPECT_EQ(MOJO_RESULT_OK, handles[i].dispatcher->Close()) << i;
248 } 248 }
249 249
250 // TODO(vtl): Figure out how to test |MarkBusyAndStartTransport()|.
251
250 } // namespace 252 } // namespace
251 } // namespace system 253 } // namespace system
252 } // namespace mojo 254 } // namespace mojo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698