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 "remoting/client/queued_task_poster.h" | 5 #include "remoting/client/queued_task_poster.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
| 11 #include "base/memory/ref_counted.h" |
11 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
12 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 14 #include "base/single_thread_task_runner.h" |
13 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
14 #include "base/threading/thread_task_runner_handle.h" | 16 #include "base/threading/thread_task_runner_handle.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
16 | 18 |
17 namespace remoting { | 19 namespace remoting { |
18 | 20 |
19 class QueuedTaskPosterTest : public testing::Test { | 21 class QueuedTaskPosterTest : public testing::Test { |
20 public: | 22 public: |
21 QueuedTaskPosterTest(); | 23 QueuedTaskPosterTest(); |
22 void SetUp() override; | 24 void SetUp() override; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 | 138 |
137 poster_->AddTask(AssertExecutionOrderClosure(4)); | 139 poster_->AddTask(AssertExecutionOrderClosure(4)); |
138 poster_->AddTask(AssertExecutionOrderClosure(5)); | 140 poster_->AddTask(AssertExecutionOrderClosure(5)); |
139 poster_->AddTask(AssertExecutionOrderClosure(6)); | 141 poster_->AddTask(AssertExecutionOrderClosure(6)); |
140 | 142 |
141 RunUntilPosterDone(); | 143 RunUntilPosterDone(); |
142 EXPECT_EQ(6, current_execution_order_); | 144 EXPECT_EQ(6, current_execution_order_); |
143 } | 145 } |
144 | 146 |
145 } // namespace remoting | 147 } // namespace remoting |
OLD | NEW |