Index: third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp |
diff --git a/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp b/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp |
index 2213c24b4bb9c9373a849374bbae5a3e31666bd7..0c5210c41d8e7a09257865bf938153f689dc9baf 100644 |
--- a/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp |
+++ b/third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp |
@@ -1125,7 +1125,8 @@ TEST(ImageResourceTest, |
} |
TEST(ImageResourceTest, PeriodicFlushTest) { |
- TestingPlatformSupportWithMockScheduler platform; |
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler> |
+ platform(new TestingPlatformSupportWithMockScheduler); |
KURL testURL(ParsedURLString, "http://www.test.com/cancelTest.html"); |
URLTestHelpers::registerMockedURLLoad(testURL, "cancelTest.html", |
"text/html"); |
@@ -1155,8 +1156,8 @@ TEST(ImageResourceTest, PeriodicFlushTest) { |
EXPECT_TRUE(cachedImage->getContent()->hasImage()); |
EXPECT_EQ(1, client->imageChangedCount()); |
- platform.runForPeriodSeconds(1.); |
- platform.advanceClockSeconds(1.); |
+ platform->runForPeriodSeconds(1.); |
+ platform->advanceClockSeconds(1.); |
// Sanity check that we created an image after appending |meaningfulImageSize| |
// bytes just once. |
@@ -1180,13 +1181,13 @@ TEST(ImageResourceTest, PeriodicFlushTest) { |
EXPECT_EQ(flushCount, client->imageChangedCount()); |
++bytesSent; |
- platform.runForPeriodSeconds(0.2001); |
+ platform->runForPeriodSeconds(0.2001); |
} |
} |
// Increasing time by a large number only causes one extra flush. |
- platform.runForPeriodSeconds(10.); |
- platform.advanceClockSeconds(10.); |
+ platform->runForPeriodSeconds(10.); |
+ platform->advanceClockSeconds(10.); |
EXPECT_FALSE(cachedImage->errorOccurred()); |
ASSERT_TRUE(cachedImage->getContent()->hasImage()); |
EXPECT_FALSE(cachedImage->getContent()->getImage()->isNull()); |