Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: Source/platform/scheduler/SchedulerTest.cpp

Issue 630853002: Replacing the OVERRIDE with override in third_party/WebKit/Source/platform (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase build fix Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | Source/platform/scroll/ScrollAnimatorNone.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 16 matching lines...) Expand all
27 } 27 }
28 28
29 using Scheduler::Normal; 29 using Scheduler::Normal;
30 using Scheduler::CompositorPriority; 30 using Scheduler::CompositorPriority;
31 using Scheduler::enterSchedulerPolicy; 31 using Scheduler::enterSchedulerPolicy;
32 }; 32 };
33 33
34 class TestMainThread : public blink::WebThread { 34 class TestMainThread : public blink::WebThread {
35 public: 35 public:
36 // blink::WebThread implementation. 36 // blink::WebThread implementation.
37 virtual void postTask(Task* task) OVERRIDE 37 virtual void postTask(Task* task) override
38 { 38 {
39 m_pendingTasks.append(adoptPtr(task)); 39 m_pendingTasks.append(adoptPtr(task));
40 } 40 }
41 41
42 virtual void postDelayedTask(Task* task, long long delayMs) OVERRIDE 42 virtual void postDelayedTask(Task* task, long long delayMs) override
43 { 43 {
44 ASSERT_NOT_REACHED(); 44 ASSERT_NOT_REACHED();
45 } 45 }
46 46
47 virtual bool isCurrentThread() const OVERRIDE 47 virtual bool isCurrentThread() const override
48 { 48 {
49 return true; 49 return true;
50 } 50 }
51 51
52 virtual blink::PlatformThreadId threadId() const OVERRIDE 52 virtual blink::PlatformThreadId threadId() const override
53 { 53 {
54 ASSERT_NOT_REACHED(); 54 ASSERT_NOT_REACHED();
55 return 0; 55 return 0;
56 } 56 }
57 57
58 virtual void enterRunLoop() OVERRIDE 58 virtual void enterRunLoop() override
59 { 59 {
60 ASSERT_NOT_REACHED(); 60 ASSERT_NOT_REACHED();
61 } 61 }
62 62
63 virtual void exitRunLoop() OVERRIDE 63 virtual void exitRunLoop() override
64 { 64 {
65 ASSERT_NOT_REACHED(); 65 ASSERT_NOT_REACHED();
66 } 66 }
67 67
68 void runPendingTasks() 68 void runPendingTasks()
69 { 69 {
70 while (!m_pendingTasks.isEmpty()) 70 while (!m_pendingTasks.isEmpty())
71 m_pendingTasks.takeFirst()->run(); 71 m_pendingTasks.takeFirst()->run();
72 } 72 }
73 73
(...skipping 11 matching lines...) Expand all
85 SchedulerTestingPlatformSupport() 85 SchedulerTestingPlatformSupport()
86 : TestingPlatformSupport(TestingPlatformSupport::Config()) 86 : TestingPlatformSupport(TestingPlatformSupport::Config())
87 , m_sharedTimerFunction(nullptr) 87 , m_sharedTimerFunction(nullptr)
88 , m_sharedTimerRunning(false) 88 , m_sharedTimerRunning(false)
89 , m_sharedTimerFireInterval(0) 89 , m_sharedTimerFireInterval(0)
90 , m_monotonicallyIncreasingTime(0) 90 , m_monotonicallyIncreasingTime(0)
91 { 91 {
92 } 92 }
93 93
94 // blink::Platform implementation. 94 // blink::Platform implementation.
95 virtual blink::WebThread* currentThread() OVERRIDE 95 virtual blink::WebThread* currentThread() override
96 { 96 {
97 return &m_mainThread; 97 return &m_mainThread;
98 } 98 }
99 99
100 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction) OVERRIDE 100 virtual void setSharedTimerFiredFunction(SharedTimerFunction timerFunction) override
101 { 101 {
102 m_sharedTimerFunction = timerFunction; 102 m_sharedTimerFunction = timerFunction;
103 } 103 }
104 104
105 virtual double monotonicallyIncreasingTime() OVERRIDE 105 virtual double monotonicallyIncreasingTime() override
106 { 106 {
107 return m_monotonicallyIncreasingTime; 107 return m_monotonicallyIncreasingTime;
108 } 108 }
109 109
110 virtual void setSharedTimerFireInterval(double) 110 virtual void setSharedTimerFireInterval(double)
111 { 111 {
112 m_sharedTimerFireInterval = 0; 112 m_sharedTimerFireInterval = 0;
113 m_sharedTimerRunning = true; 113 m_sharedTimerRunning = true;
114 } 114 }
115 115
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 { 164 {
165 SchedulerForTest::initializeOnMainThread(); 165 SchedulerForTest::initializeOnMainThread();
166 m_scheduler = static_cast<SchedulerForTest*>(Scheduler::shared()); 166 m_scheduler = static_cast<SchedulerForTest*>(Scheduler::shared());
167 } 167 }
168 168
169 ~SchedulerTest() 169 ~SchedulerTest()
170 { 170 {
171 Scheduler::shutdown(); 171 Scheduler::shutdown();
172 } 172 }
173 173
174 virtual void SetUp() OVERRIDE 174 virtual void SetUp() override
175 { 175 {
176 m_scheduler->enterSchedulerPolicy(SchedulerForTest::Normal); 176 m_scheduler->enterSchedulerPolicy(SchedulerForTest::Normal);
177 } 177 }
178 178
179 virtual void TearDown() OVERRIDE 179 virtual void TearDown() override
180 { 180 {
181 // If the Scheduler hasn't been shut down then explicitly flush the task s. 181 // If the Scheduler hasn't been shut down then explicitly flush the task s.
182 if (Scheduler::shared()) 182 if (Scheduler::shared())
183 runPendingTasks(); 183 runPendingTasks();
184 } 184 }
185 185
186 void runPendingTasks() 186 void runPendingTasks()
187 { 187 {
188 m_platformSupport.runPendingTasks(); 188 m_platformSupport.runPendingTasks();
189 } 189 }
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 m_platformSupport.setMonotonicTimeForTest(1000.5); 530 m_platformSupport.setMonotonicTimeForTest(1000.5);
531 runPendingTasks(); 531 runPendingTasks();
532 532
533 ASSERT_FALSE(m_scheduler->shouldYieldForHighPriorityWork()); 533 ASSERT_FALSE(m_scheduler->shouldYieldForHighPriorityWork());
534 m_scheduler->postCompositorTask(FROM_HERE, WTF::bind(&dummyTask)); 534 m_scheduler->postCompositorTask(FROM_HERE, WTF::bind(&dummyTask));
535 535
536 EXPECT_FALSE(m_scheduler->shouldYieldForHighPriorityWork()); 536 EXPECT_FALSE(m_scheduler->shouldYieldForHighPriorityWork());
537 } 537 }
538 538
539 } // namespace 539 } // namespace
OLDNEW
« no previous file with comments | « Source/platform/scheduler/Scheduler.cpp ('k') | Source/platform/scroll/ScrollAnimatorNone.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698