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

Unified Diff: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp

Issue 2588403002: TestingPlatformSupport: register Platform instance correctly (Closed)
Patch Set: review #32 Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
index a79f95da18af2cce2f82da4bae96dffd417f8721..f532ed74d67875cc3174b7e51375523f0e254d9c 100644
--- a/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
+++ b/third_party/WebKit/Source/platform/graphics/RecordingImageBufferSurfaceTest.cpp
@@ -231,14 +231,15 @@ class RecordingImageBufferSurfaceTest : public Test {
std::unique_ptr<ImageBuffer> m_imageBuffer;
};
-#define CALL_TEST_TASK_WRAPPER(TEST_METHOD) \
- { \
- TestingPlatformSupportWithMockScheduler testingPlatform; \
- Platform::current()->currentThread()->getWebTaskRunner()->postTask( \
- BLINK_FROM_HERE, \
- WTF::bind(&RecordingImageBufferSurfaceTest::TEST_METHOD, \
- WTF::unretained(this))); \
- testingPlatform.runUntilIdle(); \
+#define CALL_TEST_TASK_WRAPPER(TEST_METHOD) \
+ { \
+ ScopedTestingPlatformSupport<TestingPlatformSupportWithMockScheduler> \
+ platform; \
+ Platform::current()->currentThread()->getWebTaskRunner()->postTask( \
+ BLINK_FROM_HERE, \
+ WTF::bind(&RecordingImageBufferSurfaceTest::TEST_METHOD, \
+ WTF::unretained(this))); \
+ platform->runUntilIdle(); \
}
TEST_F(RecordingImageBufferSurfaceTest, testEmptyPicture) {

Powered by Google App Engine
This is Rietveld 408576698