| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "platform/Timer.h" | 5 #include "platform/Timer.h" |
| 6 | 6 |
| 7 #include "platform/testing/TestingPlatformSupport.h" | 7 #include "platform/testing/TestingPlatformSupport.h" |
| 8 #include "public/platform/Platform.h" | 8 #include "public/platform/Platform.h" |
| 9 #include "public/platform/WebScheduler.h" | 9 #include "public/platform/WebScheduler.h" |
| 10 #include "public/platform/WebThread.h" | 10 #include "public/platform/WebThread.h" |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 { | 87 { |
| 88 m_timerTasks->push(DelayedTask(task, delayMs * 0.001)); | 88 m_timerTasks->push(DelayedTask(task, delayMs * 0.001)); |
| 89 } | 89 } |
| 90 | 90 |
| 91 bool runsTasksOnCurrentThread() override | 91 bool runsTasksOnCurrentThread() override |
| 92 { | 92 { |
| 93 NOTREACHED(); | 93 NOTREACHED(); |
| 94 return true; | 94 return true; |
| 95 } | 95 } |
| 96 | 96 |
| 97 WebTaskRunner* clone() override | 97 std::unique_ptr<WebTaskRunner> clone() override |
| 98 { | 98 { |
| 99 NOTREACHED(); | 99 NOTREACHED(); |
| 100 return nullptr; | 100 return nullptr; |
| 101 } | 101 } |
| 102 | 102 |
| 103 double virtualTimeSeconds() const override | 103 double virtualTimeSeconds() const override |
| 104 { | 104 { |
| 105 NOTREACHED(); | 105 NOTREACHED(); |
| 106 return 0.0; | 106 return 0.0; |
| 107 } | 107 } |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 784 TimerForTest<TimerTest> timer(this, &TimerTest::countingTask, &taskRunner); | 784 TimerForTest<TimerTest> timer(this, &TimerTest::countingTask, &taskRunner); |
| 785 timer.startOneShot(0, BLINK_FROM_HERE); | 785 timer.startOneShot(0, BLINK_FROM_HERE); |
| 786 | 786 |
| 787 // Make sure the task was posted on taskRunner. | 787 // Make sure the task was posted on taskRunner. |
| 788 EXPECT_FALSE(timerTasks.empty()); | 788 EXPECT_FALSE(timerTasks.empty()); |
| 789 } | 789 } |
| 790 | 790 |
| 791 | 791 |
| 792 } // namespace | 792 } // namespace |
| 793 } // namespace blink | 793 } // namespace blink |
| OLD | NEW |