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

Side by Side Diff: mojo/public/cpp/bindings/tests/bind_task_runner_unittest.cc

Issue 2024723002: DO NOT COMMIT (will be split in sub-components) - clang-tidy WaitableEvent refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WEvent_enums
Patch Set: fix presubmits Created 4 years, 6 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 "base/message_loop/message_loop.h" 5 #include "base/message_loop/message_loop.h"
6 #include "base/single_thread_task_runner.h" 6 #include "base/single_thread_task_runner.h"
7 #include "base/synchronization/lock.h" 7 #include "base/synchronization/lock.h"
8 #include "base/synchronization/waitable_event.h" 8 #include "base/synchronization/waitable_event.h"
9 #include "base/threading/platform_thread.h" 9 #include "base/threading/platform_thread.h"
10 #include "mojo/public/cpp/bindings/associated_binding.h" 10 #include "mojo/public/cpp/bindings/associated_binding.h"
11 #include "mojo/public/cpp/bindings/associated_group.h" 11 #include "mojo/public/cpp/bindings/associated_group.h"
12 #include "mojo/public/cpp/bindings/associated_interface_ptr.h" 12 #include "mojo/public/cpp/bindings/associated_interface_ptr.h"
13 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h" 13 #include "mojo/public/cpp/bindings/associated_interface_ptr_info.h"
14 #include "mojo/public/cpp/bindings/associated_interface_request.h" 14 #include "mojo/public/cpp/bindings/associated_interface_request.h"
15 #include "mojo/public/cpp/bindings/binding.h" 15 #include "mojo/public/cpp/bindings/binding.h"
16 #include "mojo/public/interfaces/bindings/tests/test_associated_interfaces.mojom .h" 16 #include "mojo/public/interfaces/bindings/tests/test_associated_interfaces.mojom .h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 18
19 namespace mojo { 19 namespace mojo {
20 namespace test { 20 namespace test {
21 namespace { 21 namespace {
22 22
23 class TestTaskRunner : public base::SingleThreadTaskRunner { 23 class TestTaskRunner : public base::SingleThreadTaskRunner {
24 public: 24 public:
25 TestTaskRunner() 25 TestTaskRunner()
26 : thread_id_(base::PlatformThread::CurrentRef()), 26 : thread_id_(base::PlatformThread::CurrentRef()),
27 quit_called_(false), 27 quit_called_(false),
28 task_ready_(false, false) {} 28 task_ready_(base::WaitableEvent::ResetPolicy::AUTOMATIC,
29 base::WaitableEvent::InitialState::NOT_SIGNALED) {}
29 30
30 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here, 31 bool PostNonNestableDelayedTask(const tracked_objects::Location& from_here,
31 const base::Closure& task, 32 const base::Closure& task,
32 base::TimeDelta delay) override { 33 base::TimeDelta delay) override {
33 NOTREACHED(); 34 NOTREACHED();
34 return false; 35 return false;
35 } 36 }
36 37
37 bool PostDelayedTask(const tracked_objects::Location& from_here, 38 bool PostDelayedTask(const tracked_objects::Location& from_here,
38 const base::Closure& task, 39 const base::Closure& task,
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 EXPECT_TRUE(sender_impl_error); 361 EXPECT_TRUE(sender_impl_error);
361 connection_ptr_task_runner_->Run(); 362 connection_ptr_task_runner_->Run();
362 EXPECT_TRUE(connection_ptr_error); 363 EXPECT_TRUE(connection_ptr_error);
363 sender_ptr_task_runner_->Run(); 364 sender_ptr_task_runner_->Run();
364 EXPECT_TRUE(sender_ptr_error); 365 EXPECT_TRUE(sender_ptr_error);
365 } 366 }
366 367
367 } // namespace 368 } // namespace
368 } // namespace test 369 } // namespace test
369 } // namespace mojo 370 } // namespace mojo
OLDNEW
« no previous file with comments | « media/gpu/ipc/service/gpu_video_decode_accelerator.cc ('k') | net/base/address_tracker_linux_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698