OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/sequence_checker_impl.h" | 5 #include "base/sequence_checker_impl.h" |
6 | 6 |
7 #include <cstddef> | 7 #include <cstddef> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/location.h" | 11 #include "base/location.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/message_loop.h" | 13 #include "base/message_loop.h" |
14 #include "base/task/sequenced_task_runner.h" | 14 #include "base/sequenced_task_runner.h" |
15 #include "base/threading/thread.h" | 15 #include "base/threading/thread.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 namespace base { | 18 namespace base { |
19 | 19 |
20 namespace { | 20 namespace { |
21 | 21 |
22 // Implementation of SequencedTaskRunner that lets us control what | 22 // Implementation of SequencedTaskRunner that lets us control what |
23 // RunsTasksOnCurrentThread() returns. | 23 // RunsTasksOnCurrentThread() returns. |
24 class FakeTaskRunner : public SequencedTaskRunner { | 24 class FakeTaskRunner : public SequencedTaskRunner { |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 Unretained(&sequence_checker_impl), | 209 Unretained(&sequence_checker_impl), |
210 false)); | 210 false)); |
211 } | 211 } |
212 | 212 |
213 EXPECT_TRUE(sequence_checker_impl.CalledOnValidSequence()); | 213 EXPECT_TRUE(sequence_checker_impl.CalledOnValidSequence()); |
214 } | 214 } |
215 | 215 |
216 } // namespace | 216 } // namespace |
217 | 217 |
218 } // namespace base | 218 } // namespace base |
OLD | NEW |