DescriptionTestingPlatformSupport: 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}
Committed: https://chromium.googlesource.com/chromium/src/+/f651acf25aaea54d6aed2488c8237214f1a2b38f
Patch Set 1 #Patch Set 2 : wip: new plan #Patch Set 3 : new plan #
Total comments: 9
Patch Set 4 : review #16 and merge master #
Total comments: 13
Patch Set 5 : review #22 #Patch Set 6 : LocaleMacTest needed same caller side fix #
Total comments: 3
Patch Set 7 : new plan #
Total comments: 19
Patch Set 8 : review #32 #Dependent Patchsets: Messages
Total messages: 40 (21 generated)
|