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

Issue 2644083003: ResourceFetcherTest: introduce FetchTestingPlatformSupport (Closed)

Created:
3 years, 11 months ago by Takashi Toyoshima
Modified:
3 years, 11 months ago
Reviewers:
kinuko, yhirano
CC:
chromium-reviews, tyoshino+watch_chromium.org, Yoav Weiss, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, Nate Chapin
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

ResourceFetcherTest: introduce FetchTestingPlatformSupport To move ResourceFetcherTest under platform, we need to use TestingPlatformSupportWithMockScheduler and to make WebURLLoaderMockFactory available with the MockScheduler. FetchTestingPlatformSupport is the TestingPlatformSupport inheritance that adds WebURLLoaderMockFactory and FetchContext support. At this point, only ResourceFetcherTest use the FetchTestingplatformSupport, but eventually, other tests may want to use it. Also this patch contains modifications to remove cached resources and all mock URL entries so that we can cleanup each test safely. This is needed to pass LinkPreloadResourceMultipleFetchersAnd{Use|Move} without any retry. BUG=655920 TEST=webkit_unit_tests --gtest_filter='ResourceFetcherTest.*' Review-Url: https://codereview.chromium.org/2644083003 Cr-Commit-Position: refs/heads/master@{#445639} Committed: https://chromium.googlesource.com/chromium/src/+/284fe71823b4516ac5630addd2f44788347ddd07

Patch Set 1 #

Total comments: 3

Patch Set 2 : FetchTestingPlatformSupport #

Total comments: 4

Patch Set 3 : android arm64 build fix #

Patch Set 4 : merge 2647903002 #

Patch Set 5 : style nits that could not be detected by cl format #

Total comments: 3

Patch Set 6 : review #23 #

Total comments: 2

Messages

Total messages: 47 (21 generated)
Takashi Toyoshima
Yep, finally, I made the last patch to run all fetch unit tests under platform. ...
3 years, 11 months ago (2017-01-19 14:00:08 UTC) #4
kinuko
https://codereview.chromium.org/2644083003/diff/1/third_party/WebKit/Source/core/fetch/MockFetchContext.h File third_party/WebKit/Source/core/fetch/MockFetchContext.h (right): https://codereview.chromium.org/2644083003/diff/1/third_party/WebKit/Source/core/fetch/MockFetchContext.h#newcode59 third_party/WebKit/Source/core/fetch/MockFetchContext.h:59: RefPtr<WebTaskRunner> loadingTaskRunner() const override { return m_runner; } Could ...
3 years, 11 months ago (2017-01-19 18:40:18 UTC) #5
Takashi Toyoshima
https://codereview.chromium.org/2644083003/diff/1/third_party/WebKit/Source/core/fetch/MockFetchContext.h File third_party/WebKit/Source/core/fetch/MockFetchContext.h (right): https://codereview.chromium.org/2644083003/diff/1/third_party/WebKit/Source/core/fetch/MockFetchContext.h#newcode59 third_party/WebKit/Source/core/fetch/MockFetchContext.h:59: RefPtr<WebTaskRunner> loadingTaskRunner() const override { return m_runner; } The ...
3 years, 11 months ago (2017-01-20 04:13:16 UTC) #6
Takashi Toyoshima
> Probably, we will continue to use per-frame runner. Sorry, this means, *per-thread* runner in ...
3 years, 11 months ago (2017-01-20 04:14:51 UTC) #7
kinuko
https://codereview.chromium.org/2644083003/diff/1/third_party/WebKit/Source/core/fetch/MockFetchContext.h File third_party/WebKit/Source/core/fetch/MockFetchContext.h (right): https://codereview.chromium.org/2644083003/diff/1/third_party/WebKit/Source/core/fetch/MockFetchContext.h#newcode59 third_party/WebKit/Source/core/fetch/MockFetchContext.h:59: RefPtr<WebTaskRunner> loadingTaskRunner() const override { return m_runner; } On ...
3 years, 11 months ago (2017-01-20 05:00:33 UTC) #8
Takashi Toyoshima
Ah, good point. TestingPlatformSupport is designed to be used in both core and platform. So ...
3 years, 11 months ago (2017-01-20 05:45:47 UTC) #9
kinuko
On 2017/01/20 05:45:47, toyoshim wrote: > Ah, good point. TestingPlatformSupport is designed to be used ...
3 years, 11 months ago (2017-01-20 05:51:52 UTC) #10
Takashi Toyoshima
PTAL https://codereview.chromium.org/2644083003/diff/20001/third_party/WebKit/Source/core/fetch/MockFetchContext.h File third_party/WebKit/Source/core/fetch/MockFetchContext.h (right): https://codereview.chromium.org/2644083003/diff/20001/third_party/WebKit/Source/core/fetch/MockFetchContext.h#newcode32 third_party/WebKit/Source/core/fetch/MockFetchContext.h:32: // TODO(toyoshim): Disallow to pass nullptr for |taskRunner|, ...
3 years, 11 months ago (2017-01-20 07:11:44 UTC) #12
kinuko
Thanks for keeping updating this one, I have a few more comments...! (I've wanted to ...
3 years, 11 months ago (2017-01-20 12:30:34 UTC) #19
Takashi Toyoshima
> What do you think if we make WebURLLoaderMockFactory optionally take > TestingPlatformSupport and call ...
3 years, 11 months ago (2017-01-23 06:39:16 UTC) #22
yhirano
If we can assume that ScopedTestingPlatformSupport is used, can we use Platform::current instead of passing ...
3 years, 11 months ago (2017-01-23 07:42:15 UTC) #23
yhirano
On 2017/01/23 07:42:15, yhirano wrote: > If we can assume that ScopedTestingPlatformSupport is used, can ...
3 years, 11 months ago (2017-01-23 07:46:20 UTC) #24
yhirano
On 2017/01/23 07:46:20, yhirano wrote: > On 2017/01/23 07:42:15, yhirano wrote: > > If we ...
3 years, 11 months ago (2017-01-23 07:50:17 UTC) #25
kinuko
On 2017/01/23 07:50:17, yhirano wrote: > On 2017/01/23 07:46:20, yhirano wrote: > > On 2017/01/23 ...
3 years, 11 months ago (2017-01-23 08:15:15 UTC) #26
kinuko
Aside that, the current code change itself lgtm.
3 years, 11 months ago (2017-01-23 08:20:11 UTC) #27
Takashi Toyoshima
There are several options for better handling of runUntilIdle, but I have no idea which ...
3 years, 11 months ago (2017-01-23 09:18:13 UTC) #28
Takashi Toyoshima
description was also modified to be up to date. PTAL.
3 years, 11 months ago (2017-01-23 09:24:49 UTC) #30
kinuko
On 2017/01/23 09:18:13, toyoshim wrote: > There are several options for better handling of runUntilIdle, ...
3 years, 11 months ago (2017-01-23 10:55:13 UTC) #33
kinuko
On 2017/01/23 10:55:13, kinuko wrote: > On 2017/01/23 09:18:13, toyoshim wrote: > > There are ...
3 years, 11 months ago (2017-01-23 10:57:25 UTC) #34
yhirano
https://codereview.chromium.org/2644083003/diff/100001/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc File third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc (right): https://codereview.chromium.org/2644083003/diff/100001/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc#newcode24 third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc:24: std::unique_ptr<WebURLLoaderMockFactory> WebURLLoaderMockFactory::create() How about adding a (non-null) TestingPlatformSupport parameter ...
3 years, 11 months ago (2017-01-23 11:38:56 UTC) #37
kinuko
https://codereview.chromium.org/2644083003/diff/100001/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc File third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc (right): https://codereview.chromium.org/2644083003/diff/100001/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc#newcode24 third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc:24: std::unique_ptr<WebURLLoaderMockFactory> WebURLLoaderMockFactory::create() On 2017/01/23 11:38:56, yhirano wrote: > How ...
3 years, 11 months ago (2017-01-24 00:39:05 UTC) #38
yhirano
On 2017/01/24 00:39:05, kinuko wrote: > https://codereview.chromium.org/2644083003/diff/100001/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc > File > third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.cc > (right): > > ...
3 years, 11 months ago (2017-01-24 03:33:28 UTC) #39
Takashi Toyoshima
> Platform.h is a public layer that is also exposed outside blink, I'm not too ...
3 years, 11 months ago (2017-01-24 03:43:33 UTC) #40
yhirano
lgtm
3 years, 11 months ago (2017-01-24 04:14:34 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2644083003/100001
3 years, 11 months ago (2017-01-24 04:16:56 UTC) #44
commit-bot: I haz the power
3 years, 11 months ago (2017-01-24 04:21:53 UTC) #47
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://chromium.googlesource.com/chromium/src/+/284fe71823b4516ac5630addd2f4...

Powered by Google App Engine
This is Rietveld 408576698