| Index: third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
|
| diff --git a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
|
| index 0df963532194839e08c4e382f36774dfa2d95fce..0299a5d380c9ceed00fdf90056bd601bfc0db362 100644
|
| --- a/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
|
| +++ b/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DTest.cpp
|
| @@ -1404,15 +1404,24 @@ class CanvasRenderingContext2DTestWithTestingPlatform
|
| : public CanvasRenderingContext2DTest {
|
| protected:
|
| void SetUp() override {
|
| + platform_ = WTF::MakeUnique<ScopedTestingPlatformSupport<
|
| + TestingPlatformSupportWithMockScheduler>>();
|
| override_settings_function_ = &OverrideScriptEnabled;
|
| - platform_->AdvanceClockSeconds(1.); // For non-zero DocumentParserTimings.
|
| + (*platform_)
|
| + ->AdvanceClockSeconds(1.); // For non-zero DocumentParserTimings.
|
| CanvasRenderingContext2DTest::SetUp();
|
| GetDocument().View()->UpdateLayout();
|
| }
|
|
|
| - void RunUntilIdle() { platform_->RunUntilIdle(); }
|
| + void TearDown() override {
|
| + platform_.reset();
|
| + CanvasRenderingContext2DTest::TearDown();
|
| + }
|
| +
|
| + void RunUntilIdle() { (*platform_)->RunUntilIdle(); }
|
|
|
| - ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>
|
| + std::unique_ptr<
|
| + ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler>>
|
| platform_;
|
| };
|
|
|
| @@ -1458,6 +1467,7 @@ TEST_F(CanvasRenderingContext2DTestWithTestingPlatform,
|
| false);
|
| EXPECT_EQ(!!CANVAS2D_HIBERNATION_ENABLED,
|
| layer->NeedsCompositingInputsUpdate());
|
| + RunUntilIdle(); // Clear task queue.
|
| }
|
|
|
| } // namespace blink
|
|
|