| 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 <memory> |
| 8 #include <queue> |
| 7 #include "platform/scheduler/base/task_queue_impl.h" | 9 #include "platform/scheduler/base/task_queue_impl.h" |
| 8 #include "platform/scheduler/child/web_task_runner_impl.h" | 10 #include "platform/scheduler/child/web_task_runner_impl.h" |
| 9 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" | 11 #include "platform/scheduler/renderer/renderer_scheduler_impl.h" |
| 10 #include "platform/testing/TestingPlatformSupport.h" | 12 #include "platform/testing/TestingPlatformSupport.h" |
| 11 #include "public/platform/Platform.h" | 13 #include "public/platform/Platform.h" |
| 12 #include "public/platform/WebScheduler.h" | 14 #include "public/platform/WebScheduler.h" |
| 13 #include "public/platform/WebThread.h" | 15 #include "public/platform/WebThread.h" |
| 14 #include "public/platform/WebViewScheduler.h" | 16 #include "public/platform/WebViewScheduler.h" |
| 15 #include "testing/gmock/include/gmock/gmock.h" | 17 #include "testing/gmock/include/gmock/gmock.h" |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "wtf/CurrentTime.h" | 19 #include "wtf/CurrentTime.h" |
| 18 #include "wtf/PtrUtil.h" | 20 #include "wtf/PtrUtil.h" |
| 19 #include "wtf/RefCounted.h" | 21 #include "wtf/RefCounted.h" |
| 20 #include <memory> | |
| 21 #include <queue> | |
| 22 | 22 |
| 23 using testing::ElementsAre; | 23 using testing::ElementsAre; |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 namespace { | 26 namespace { |
| 27 | 27 |
| 28 class TimerTest : public testing::Test { | 28 class TimerTest : public testing::Test { |
| 29 public: | 29 public: |
| 30 void SetUp() override { | 30 void SetUp() override { |
| 31 m_runTimes.clear(); | 31 m_runTimes.clear(); |
| (...skipping 685 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 TimerForTest<TimerTest> timer(webTaskRunner1, this, &TimerTest::countingTask); | 717 TimerForTest<TimerTest> timer(webTaskRunner1, this, &TimerTest::countingTask); |
| 718 | 718 |
| 719 m_platform->runUntilIdle(); | 719 m_platform->runUntilIdle(); |
| 720 EXPECT_TRUE(!m_runTimes.size()); | 720 EXPECT_TRUE(!m_runTimes.size()); |
| 721 EXPECT_TRUE(taskRunner1->IsEmpty()); | 721 EXPECT_TRUE(taskRunner1->IsEmpty()); |
| 722 EXPECT_TRUE(taskRunner2->IsEmpty()); | 722 EXPECT_TRUE(taskRunner2->IsEmpty()); |
| 723 } | 723 } |
| 724 | 724 |
| 725 } // namespace | 725 } // namespace |
| 726 } // namespace blink | 726 } // namespace blink |
| OLD | NEW |