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

Side by Side Diff: third_party/WebKit/Source/core/svg/graphics/SVGImageTest.cpp

Issue 2118903002: scheduler: Move the Blink scheduler into Blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "core/svg/graphics/SVGImage.h" 5 #include "core/svg/graphics/SVGImage.h"
6 6
7 #include "core/svg/graphics/SVGImageChromeClient.h" 7 #include "core/svg/graphics/SVGImageChromeClient.h"
8 #include "platform/SharedBuffer.h" 8 #include "platform/SharedBuffer.h"
9 #include "platform/Timer.h" 9 #include "platform/Timer.h"
10 #include "platform/geometry/FloatRect.h" 10 #include "platform/geometry/FloatRect.h"
(...skipping 25 matching lines...) Expand all
36 { 36 {
37 if (m_currentTask) 37 if (m_currentTask)
38 delete m_currentTask; 38 delete m_currentTask;
39 m_currentTask = task; 39 m_currentTask = task;
40 40
41 } 41 }
42 bool runsTasksOnCurrentThread() override { return true; } 42 bool runsTasksOnCurrentThread() override { return true; }
43 std::unique_ptr<WebTaskRunner> clone() override { return nullptr; } 43 std::unique_ptr<WebTaskRunner> clone() override { return nullptr; }
44 double virtualTimeSeconds() const override { return 0.0; } 44 double virtualTimeSeconds() const override { return 0.0; }
45 double monotonicallyIncreasingVirtualTimeSeconds() const override { return m _time; } 45 double monotonicallyIncreasingVirtualTimeSeconds() const override { return m _time; }
46 SingleThreadTaskRunner* taskRunner() override { return nullptr; }
46 47
47 double m_time; 48 double m_time;
48 Task* m_currentTask; 49 Task* m_currentTask;
49 }; 50 };
50 51
51 class MockTimer : public TaskRunnerTimer<SVGImageChromeClient> { 52 class MockTimer : public TaskRunnerTimer<SVGImageChromeClient> {
52 public: 53 public:
53 using TimerFiredFunction = typename TaskRunnerTimer<SVGImageChromeClient>::T imerFiredFunction; 54 using TimerFiredFunction = typename TaskRunnerTimer<SVGImageChromeClient>::T imerFiredFunction;
54 55
55 MockTimer(SVGImageChromeClient* o, TimerFiredFunction f) 56 MockTimer(SVGImageChromeClient* o, TimerFiredFunction f)
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 EXPECT_TRUE(chromeClient.isSuspended()); 189 EXPECT_TRUE(chromeClient.isSuspended());
189 EXPECT_FALSE(timer->isActive()); 190 EXPECT_FALSE(timer->isActive());
190 191
191 // Simulate a draw. This should resume the animation again. 192 // Simulate a draw. This should resume the animation again.
192 pumpFrame(); 193 pumpFrame();
193 EXPECT_FALSE(chromeClient.isSuspended()); 194 EXPECT_FALSE(chromeClient.isSuspended());
194 EXPECT_TRUE(timer->isActive()); 195 EXPECT_TRUE(timer->isActive());
195 } 196 }
196 197
197 } // namespace blink 198 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/ImageQualityControllerTest.cpp ('k') | third_party/WebKit/Source/platform/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698