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

Issue 2592363002: FontResourceTest: call unregisterURL() respectively (Closed)

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

Description

FontResourceTest: call unregisterURL() respectively FontResourceTest.ResourceFetcherRevalidateDeferedResourceFromTwoInitiators test calls registerURL(), but unregisterURL() isn't called for the test. This fact makes following CacheAwareFontLoading test fails due to a check failure because WebURLLoaderMockFactory does not allow us to call registerURL() for the same URL before calling unregisterURL() for the same URL. Since the current Platform instance and WebURLLoaderMockFactory outlive each test instance, the first test affects the second test. This error is recovered by a retry, but all should pass at the first run. This fix is still leaving room for discussion to make it work safely, but this is what we are doing for WebURLLoaderMockFactory in other places today. BUG=n/a TEST=webkit_unit_tests --gtset_filter='FontResourceTest.*' Committed: https://crrev.com/58afbd36cf5ee25c2126c47f4bc72fea04d0704f Cr-Commit-Position: refs/heads/master@{#440362}

Patch Set 1 #

Total comments: 4

Patch Set 2 : done #

Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -7 lines) Patch
M third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp View 1 2 chunks +5 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.h View 1 1 chunk +2 lines, -5 lines 0 comments Download
M third_party/WebKit/public/platform/WebURLLoaderMockFactory.h View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 18 (10 generated)
Takashi Toyoshima
ptal
4 years ago (2016-12-22 06:20:05 UTC) #4
yhirano
lgtm
4 years ago (2016-12-22 06:29:27 UTC) #7
kinuko
lgtm https://codereview.chromium.org/2592363002/diff/1/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp File third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp (right): https://codereview.chromium.org/2592363002/diff/1/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp#newcode87 third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp:87: Platform::current()->getURLLoaderMockFactory()->unregisterURL(url); Do we rather want to have unregisterAllURLs() ...
4 years ago (2016-12-22 06:37:43 UTC) #8
kinuko
https://codereview.chromium.org/2592363002/diff/1/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.h File third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.h (right): https://codereview.chromium.org/2592363002/diff/1/third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.h#newcode49 third_party/WebKit/Source/platform/testing/weburl_loader_mock_factory_impl.h:49: // |response| for the same |url| for another test. ...
4 years ago (2016-12-22 06:39:26 UTC) #9
Takashi Toyoshima
https://codereview.chromium.org/2592363002/diff/1/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp File third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp (right): https://codereview.chromium.org/2592363002/diff/1/third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp#newcode87 third_party/WebKit/Source/core/loader/resource/FontResourceTest.cpp:87: Platform::current()->getURLLoaderMockFactory()->unregisterURL(url); On 2016/12/22 06:37:43, kinuko wrote: > Do we ...
4 years ago (2016-12-22 07:02:59 UTC) #10
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/2592363002/20001
4 years ago (2016-12-22 07:03:40 UTC) #13
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-22 08:25:47 UTC) #16
commit-bot: I haz the power
4 years ago (2016-12-22 08:27:51 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/58afbd36cf5ee25c2126c47f4bc72fea04d0704f
Cr-Commit-Position: refs/heads/master@{#440362}

Powered by Google App Engine
This is Rietveld 408576698