OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "config.h" | 5 #include "config.h" |
6 #include "platform/scheduler/Scheduler.h" | 6 #include "platform/scheduler/Scheduler.h" |
7 | 7 |
8 #include "platform/TestingPlatformSupport.h" | 8 #include "platform/TestingPlatformSupport.h" |
9 #include "platform/TraceLocation.h" | 9 #include "platform/TraceLocation.h" |
10 #include "public/platform/Platform.h" | 10 #include "public/platform/Platform.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 virtual void enterRunLoop() OVERRIDE | 37 virtual void enterRunLoop() OVERRIDE |
38 { | 38 { |
39 ASSERT_NOT_REACHED(); | 39 ASSERT_NOT_REACHED(); |
40 } | 40 } |
41 | 41 |
42 virtual void exitRunLoop() OVERRIDE | 42 virtual void exitRunLoop() OVERRIDE |
43 { | 43 { |
44 ASSERT_NOT_REACHED(); | 44 ASSERT_NOT_REACHED(); |
45 } | 45 } |
46 | 46 |
| 47 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction)
OVERRIDE |
| 48 { |
| 49 ASSERT_NOT_REACHED(); |
| 50 } |
| 51 |
| 52 virtual void setSharedTimerFireInterval(double interval) OVERRIDE |
| 53 { |
| 54 ASSERT_NOT_REACHED(); |
| 55 } |
| 56 |
| 57 virtual void stopSharedTimer() OVERRIDE |
| 58 { |
| 59 ASSERT_NOT_REACHED(); |
| 60 } |
| 61 |
47 void runPendingTasks() | 62 void runPendingTasks() |
48 { | 63 { |
49 while (!m_pendingTasks.isEmpty()) | 64 while (!m_pendingTasks.isEmpty()) |
50 m_pendingTasks.takeFirst()->run(); | 65 m_pendingTasks.takeFirst()->run(); |
51 } | 66 } |
52 | 67 |
53 private: | 68 private: |
54 WTF::Deque<OwnPtr<Task> > m_pendingTasks; | 69 WTF::Deque<OwnPtr<Task> > m_pendingTasks; |
55 }; | 70 }; |
56 | 71 |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
203 int result = 0; | 218 int result = 0; |
204 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 219 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
205 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 220 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
206 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 221 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
207 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); | 222 m_scheduler->postIdleTask(bind<double>(&idleTestTask, 1, &result)); |
208 runPendingTasks(); | 223 runPendingTasks(); |
209 EXPECT_EQ(4, result); | 224 EXPECT_EQ(4, result); |
210 } | 225 } |
211 | 226 |
212 } // namespace | 227 } // namespace |
OLD | NEW |