|
|
Chromium Code Reviews|
Created:
3 years, 11 months ago by Takashi Toyoshima Modified:
3 years, 11 months ago CC:
chromium-reviews, blink-reviews, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org, Nate Chapin, gavinp+loader_chromium.org Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
DescriptionUse TestingPlatformSupportWithMockScheduler to use mocked Time
Now MemoryCacheCorrectnessTest implements an original TimeFunction for
testing, but it's available via TestingPlatformSupportWithMockScheduler.
Because MemoryCacheCorrectnessTest needs to use
TestingPlatformSupportWithMockScheduler once it is moved to platform,
and to keep using the original TimeFunction costs a little to avoid
conflicting with TestingPlatformSupportWithMockScheduler's one,
let's use TestingPlatformSupportWithMockScheduler version beforehand.
BUG=655920
TEST=webkit_unit_tests --gtest_filter=MemoryCacheCorrectnessTest.\*
Review-Url: https://codereview.chromium.org/2631383003
Cr-Commit-Position: refs/heads/master@{#444763}
Committed: https://chromium.googlesource.com/chromium/src/+/4105bfeb59cd108955521f923dc7731939f07de8
Patch Set 1 #
Total comments: 2
Patch Set 2 : member Scoped... #
Total comments: 1
Patch Set 3 : rebase #Messages
Total messages: 24 (14 generated)
Description was changed from ========== Use TestingPlatformSupportWithMockScheduler to use mocked Time Now MemoryCacheCorrectnessTest implements an original TimeFunction for testing, but it's available via TestingPlatformSupportWithMockScheduler. Because MemoryCacheCorrectnessTest needs to use TestingPlatformSupportWithMockScheduler once it is moved to platform, and to keep using the original TimeFunction costs a little to avoid conflicting with TestingPlatformSupportWithMockScheduler's one, let's use TestingPlatformSupportWithMockScheduler version beforehand. BUG=655920 TEST=webkit_unit_tests --gtest_filter=MemoryCacheCorrectnessTest.\* ========== to ========== Use TestingPlatformSupportWithMockScheduler to use mocked Time Now MemoryCacheCorrectnessTest implements an original TimeFunction for testing, but it's available via TestingPlatformSupportWithMockScheduler. Because MemoryCacheCorrectnessTest needs to use TestingPlatformSupportWithMockScheduler once it is moved to platform, and to keep using the original TimeFunction costs a little to avoid conflicting with TestingPlatformSupportWithMockScheduler's one, let's use TestingPlatformSupportWithMockScheduler version beforehand. BUG=655920 TEST=webkit_unit_tests --gtest_filter=MemoryCacheCorrectnessTest.\* ==========
toyoshim@chromium.org changed reviewers: + yhirano@chromium.org
PTAL
The CQ bit was checked by toyoshim@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds...) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator-xco...)
kinuko@chromium.org changed reviewers: + kinuko@chromium.org
https://codereview.chromium.org/2631383003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/fetch/MemoryCacheCorrectnessTest.cpp (right): https://codereview.chromium.org/2631383003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/fetch/MemoryCacheCorrectnessTest.cpp:127: initialize(platform); Why don't we have platform as a member variable of MemoryCacheCorrectnessTest?
https://codereview.chromium.org/2631383003/diff/1/third_party/WebKit/Source/c... File third_party/WebKit/Source/core/fetch/MemoryCacheCorrectnessTest.cpp (right): https://codereview.chromium.org/2631383003/diff/1/third_party/WebKit/Source/c... third_party/WebKit/Source/core/fetch/MemoryCacheCorrectnessTest.cpp:127: initialize(platform); This is because ScopedTestingPlatformSupport is declared as a STACK_ALLOCATED class (using it as a member variable can not compile). haraken@ prefered it in codereview https://codereview.chromium.org/2588403002 as it's natural that ScopedFoo class is designed to be STACK_ALLOCATED. But now that we have seen some use cases that having it as a class member makes things better, I could suggest a change to remove STACK_ALLOCATED declaration. I will do so in the next patch set, and adopt same changes in a separate CL for some other tests that are better to have it as a member.
On 2017/01/19 03:51:18, toyoshim wrote: > https://codereview.chromium.org/2631383003/diff/1/third_party/WebKit/Source/c... > File third_party/WebKit/Source/core/fetch/MemoryCacheCorrectnessTest.cpp > (right): > > https://codereview.chromium.org/2631383003/diff/1/third_party/WebKit/Source/c... > third_party/WebKit/Source/core/fetch/MemoryCacheCorrectnessTest.cpp:127: > initialize(platform); > This is because ScopedTestingPlatformSupport is declared as a STACK_ALLOCATED > class (using it as a member variable can not compile). > > haraken@ prefered it in codereview https://codereview.chromium.org/2588403002 as > it's natural that ScopedFoo class is designed to be STACK_ALLOCATED. > > But now that we have seen some use cases that having it as a class member makes > things better, I could suggest a change to remove STACK_ALLOCATED declaration. > > I will do so in the next patch set, and adopt same changes in a separate CL for > some other tests that are better to have it as a member. I see... yeah I prefer being able to have it as a member. If it's only because of the naming 'scoped', some examples outside blink if it helps: ScopedTempDir, ScopedFeatureList, ScopedCanvas, various scoped objects that are backed by ScopedGeneric. We also have scoped_refptr<> which inherently implies heap-allocated objects.
Yep. Agreed that as a people who works for both inside / outside blink :)
https://codereview.chromium.org/2631383003/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h (right): https://codereview.chromium.org/2631383003/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h:196: class ScopedTestingPlatformSupport final { Same with https://codereview.chromium.org/2645733003/ Will be removed from this CL after the next rebase.
The CQ bit was checked by toyoshim@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
PTAL
lgtm
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by toyoshim@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 40001, "attempt_start_ts": 1484843207443830,
"parent_rev": "d5dc0c84d6c5e63dba21f98f0d935178316b901c", "commit_rev":
"4105bfeb59cd108955521f923dc7731939f07de8"}
Message was sent while issue was closed.
Description was changed from ========== Use TestingPlatformSupportWithMockScheduler to use mocked Time Now MemoryCacheCorrectnessTest implements an original TimeFunction for testing, but it's available via TestingPlatformSupportWithMockScheduler. Because MemoryCacheCorrectnessTest needs to use TestingPlatformSupportWithMockScheduler once it is moved to platform, and to keep using the original TimeFunction costs a little to avoid conflicting with TestingPlatformSupportWithMockScheduler's one, let's use TestingPlatformSupportWithMockScheduler version beforehand. BUG=655920 TEST=webkit_unit_tests --gtest_filter=MemoryCacheCorrectnessTest.\* ========== to ========== Use TestingPlatformSupportWithMockScheduler to use mocked Time Now MemoryCacheCorrectnessTest implements an original TimeFunction for testing, but it's available via TestingPlatformSupportWithMockScheduler. Because MemoryCacheCorrectnessTest needs to use TestingPlatformSupportWithMockScheduler once it is moved to platform, and to keep using the original TimeFunction costs a little to avoid conflicting with TestingPlatformSupportWithMockScheduler's one, let's use TestingPlatformSupportWithMockScheduler version beforehand. BUG=655920 TEST=webkit_unit_tests --gtest_filter=MemoryCacheCorrectnessTest.\* Review-Url: https://codereview.chromium.org/2631383003 Cr-Commit-Position: refs/heads/master@{#444763} Committed: https://chromium.googlesource.com/chromium/src/+/4105bfeb59cd108955521f923dc7... ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/chromium/src/+/4105bfeb59cd108955521f923dc7... |
