OLD | NEW |
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 "base/bind.h" | 5 #include "base/bind.h" |
6 #include "base/callback.h" | 6 #include "base/callback.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "base/synchronization/lock.h" | 9 #include "base/synchronization/lock.h" |
10 #include "base/synchronization/waitable_event.h" | 10 #include "base/synchronization/waitable_event.h" |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 MakeRequest(&connection_ptr_, connection_ptr_task_runner_); | 215 MakeRequest(&connection_ptr_, connection_ptr_task_runner_); |
216 connection_impl_.reset(new IntegerSenderConnectionImpl( | 216 connection_impl_.reset(new IntegerSenderConnectionImpl( |
217 std::move(connection_request), connection_binding_task_runner_, | 217 std::move(connection_request), connection_binding_task_runner_, |
218 sender_binding_task_runner_)); | 218 sender_binding_task_runner_)); |
219 | 219 |
220 connection_impl_->set_get_sender_notification( | 220 connection_impl_->set_get_sender_notification( |
221 base::Bind(&AssociatedBindTaskRunnerTest::QuitTaskRunner, | 221 base::Bind(&AssociatedBindTaskRunnerTest::QuitTaskRunner, |
222 base::Unretained(this))); | 222 base::Unretained(this))); |
223 | 223 |
224 connection_ptr_->GetSender( | 224 connection_ptr_->GetSender( |
225 MakeRequest(&sender_ptr_, nullptr, sender_ptr_task_runner_)); | 225 MakeRequest(&sender_ptr_, sender_ptr_task_runner_)); |
226 connection_binding_task_runner_->Run(); | 226 connection_binding_task_runner_->Run(); |
227 } | 227 } |
228 | 228 |
229 void QuitTaskRunner() { | 229 void QuitTaskRunner() { |
230 connection_binding_task_runner_->Quit(); | 230 connection_binding_task_runner_->Quit(); |
231 } | 231 } |
232 | 232 |
233 base::MessageLoop loop_; | 233 base::MessageLoop loop_; |
234 scoped_refptr<TestTaskRunner> connection_binding_task_runner_; | 234 scoped_refptr<TestTaskRunner> connection_binding_task_runner_; |
235 scoped_refptr<TestTaskRunner> connection_ptr_task_runner_; | 235 scoped_refptr<TestTaskRunner> connection_ptr_task_runner_; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
384 EXPECT_TRUE(sender_impl_error); | 384 EXPECT_TRUE(sender_impl_error); |
385 connection_ptr_task_runner_->Run(); | 385 connection_ptr_task_runner_->Run(); |
386 EXPECT_TRUE(connection_ptr_error); | 386 EXPECT_TRUE(connection_ptr_error); |
387 sender_ptr_task_runner_->Run(); | 387 sender_ptr_task_runner_->Run(); |
388 EXPECT_TRUE(sender_ptr_error); | 388 EXPECT_TRUE(sender_ptr_error); |
389 } | 389 } |
390 | 390 |
391 } // namespace | 391 } // namespace |
392 } // namespace test | 392 } // namespace test |
393 } // namespace mojo | 393 } // namespace mojo |
OLD | NEW |