Index: third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp |
diff --git a/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp b/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp |
index 8b31a76e72c963070cad95b28ead9461cb46ce63..adac5851c6a4f5dff4e98605249b85b7abd508bd 100644 |
--- a/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp |
+++ b/third_party/WebKit/Source/modules/notifications/NotificationImageLoaderTest.cpp |
@@ -99,20 +99,21 @@ TEST_F(NotificationImageLoaderTest, SuccessTest) { |
TEST_F(NotificationImageLoaderTest, TimeoutTest) { |
// To test for a timeout, this needs to override the clock in the platform. |
// Just creating the mock platform will do everything to set it up. |
- TestingPlatformSupportWithMockScheduler testingPlatform; |
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler> |
+ testingPlatform(new TestingPlatformSupportWithMockScheduler); |
KURL url = registerMockedURL(kIcon500x500); |
loadImage(url); |
// Run the platform for kImageFetchTimeoutInMs-1 seconds. This should not |
// result in a timeout. |
- testingPlatform.runForPeriodSeconds(kImageFetchTimeoutInMs / 1000 - 1); |
+ testingPlatform->runForPeriodSeconds(kImageFetchTimeoutInMs / 1000 - 1); |
EXPECT_EQ(LoadState::kNotLoaded, loaded()); |
m_histogramTester.expectTotalCount("Notifications.LoadFinishTime.Icon", 0); |
m_histogramTester.expectTotalCount("Notifications.LoadFileSize.Icon", 0); |
m_histogramTester.expectTotalCount("Notifications.LoadFailTime.Icon", 0); |
// Now advance time until a timeout should be expected. |
- testingPlatform.runForPeriodSeconds(2); |
+ testingPlatform->runForPeriodSeconds(2); |
// If the loader times out, it calls the callback and returns an empty bitmap. |
EXPECT_EQ(LoadState::kLoadFailed, loaded()); |