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

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

Issue 1676913002: [mojo] Delete third_party/mojo (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: let's try that again Created 4 years, 10 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 | « mojo/edk/system/shared_buffer_unittest.cc ('k') | mojo/edk/test/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 "mojo/edk/system/wait_set_dispatcher.h" 5 #include "mojo/edk/system/wait_set_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return dispatcher_result; 52 return dispatcher_result;
53 } 53 }
54 return result; 54 return result;
55 } 55 }
56 56
57 void CreateMessagePipe(scoped_refptr<MessagePipeDispatcher>* d0, 57 void CreateMessagePipe(scoped_refptr<MessagePipeDispatcher>* d0,
58 scoped_refptr<MessagePipeDispatcher>* d1) { 58 scoped_refptr<MessagePipeDispatcher>* d1) {
59 MojoHandle h0, h1; 59 MojoHandle h0, h1;
60 EXPECT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &h0, &h1)); 60 EXPECT_EQ(MOJO_RESULT_OK, MojoCreateMessagePipe(nullptr, &h0, &h1));
61 61
62 Core* core = mojo::edk::internal::GetCore(); 62 Core* core = mojo::edk::internal::g_core;
63 *d0 = scoped_refptr<MessagePipeDispatcher>( 63 *d0 = scoped_refptr<MessagePipeDispatcher>(
64 static_cast<MessagePipeDispatcher*>(core->GetDispatcher(h0).get())); 64 static_cast<MessagePipeDispatcher*>(core->GetDispatcher(h0).get()));
65 *d1 = scoped_refptr<MessagePipeDispatcher>( 65 *d1 = scoped_refptr<MessagePipeDispatcher>(
66 static_cast<MessagePipeDispatcher*>(core->GetDispatcher(h1).get())); 66 static_cast<MessagePipeDispatcher*>(core->GetDispatcher(h1).get()));
67 pipe_id_generator_++; 67 pipe_id_generator_++;
68 68
69 dispatchers_to_close_.push_back(*d0); 69 dispatchers_to_close_.push_back(*d0);
70 dispatchers_to_close_.push_back(*d1); 70 dispatchers_to_close_.push_back(*d1);
71 } 71 }
72 72
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 EXPECT_EQ(MOJO_RESULT_OK, 458 EXPECT_EQ(MOJO_RESULT_OK,
459 GetOneReadyDispatcher(wait_set, &woken_dispatcher, nullptr)); 459 GetOneReadyDispatcher(wait_set, &woken_dispatcher, nullptr));
460 EXPECT_EQ(nested_wait_set, woken_dispatcher); 460 EXPECT_EQ(nested_wait_set, woken_dispatcher);
461 461
462 wait_set->RemoveAwakable(&w, nullptr); 462 wait_set->RemoveAwakable(&w, nullptr);
463 } 463 }
464 464
465 } // namespace 465 } // namespace
466 } // namespace edk 466 } // namespace edk
467 } // namespace mojo 467 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/edk/system/shared_buffer_unittest.cc ('k') | mojo/edk/test/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698