TestingPlatformSupport: register Platform instance correctly
Now, TestingPlatformSupport registers itself as the current Platform instance, but it is inside the constructor. On the other hand, a child class TestingPlatformSupportWithMockScheduler expects the parent class reigsters it for children. But, to register a Platform instance, virtual methods should be ready to call. Rephrasing it, we can not register a Platform instance correctly inside a super-class's constructor. This patch provides ScopedTestingPlatformSupport class template that manages TestingPlatformSupport instance and Platform instance installation. Without this patch, Platform::current()->mainThread() returns a wrong WebThread, and it makes new tests that I will add fail. BUG=n/a TEST=platform_blink_unittests, webkit_unit_tests Review-Url: https://codereview.chromium.org/2588403002 Cr-Commit-Position: refs/heads/master@{#443219}
Showing
This diff is collapsed.
Please register or sign in to comment