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

Issue 2680723002: Generalize ScopedRegisteredURL as ScoedMockedURL* (Closed)

Created:
3 years, 10 months ago by Takashi Toyoshima
Modified:
3 years, 10 months ago
Reviewers:
kinuko
CC:
chromium-reviews, blink-reviews, kinuko+watch
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Generalize ScopedRegisteredURL as ScopedMockedURL* ImageResourceTest had ScopedRegisteredURL implementation, but this is a useful scheme for every tests that use URLTestHelpers. This patch creates ScopedMockedURL.{cpp|h} to have ScopedMockedURL and its variants, and makes ImageResourceTest use one of them. Eventually, we would like to obsolete URLTestHelpers. BUG=655920 Review-Url: https://codereview.chromium.org/2680723002 Cr-Commit-Position: refs/heads/master@{#448974} Committed: https://chromium.googlesource.com/chromium/src/+/9ad7d8b5293d72bbf08f72d65bb0e9d343437bad

Patch Set 1 #

Total comments: 2

Patch Set 2 : plan b #

Patch Set 3 : append missed files #

Total comments: 9

Patch Set 4 : review #13 #

Patch Set 5 : remove one more unused class #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -65 lines) Patch
M third_party/WebKit/Source/core/loader/resource/ImageResourceTest.cpp View 1 21 chunks +44 lines, -60 lines 0 comments Download
M third_party/WebKit/Source/platform/BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/testing/ScopedMockedURL.h View 1 2 3 4 1 chunk +41 lines, -0 lines 0 comments Download
A third_party/WebKit/Source/platform/testing/ScopedMockedURL.cpp View 1 2 3 4 1 chunk +28 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/URLTestHelpers.h View 1 2 3 3 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/URLTestHelpers.cpp View 1 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 24 (15 generated)
Takashi Toyoshima
Kinuko-san. What do you think about this generalizing approach? ScopedMockedURL could have multiple constructors that ...
3 years, 10 months ago (2017-02-07 08:06:46 UTC) #5
kinuko
https://codereview.chromium.org/2680723002/diff/1/third_party/WebKit/Source/platform/testing/URLTestHelpers.h File third_party/WebKit/Source/platform/testing/URLTestHelpers.h (right): https://codereview.chromium.org/2680723002/diff/1/third_party/WebKit/Source/platform/testing/URLTestHelpers.h#newcode74 third_party/WebKit/Source/platform/testing/URLTestHelpers.h:74: WebURL registerMockedErrorURLLoad(const WebURL& fullURL); To me making these methods ...
3 years, 10 months ago (2017-02-07 11:17:38 UTC) #8
Takashi Toyoshima
how about this second plan? https://codereview.chromium.org/2680723002/diff/1/third_party/WebKit/Source/platform/testing/URLTestHelpers.h File third_party/WebKit/Source/platform/testing/URLTestHelpers.h (right): https://codereview.chromium.org/2680723002/diff/1/third_party/WebKit/Source/platform/testing/URLTestHelpers.h#newcode74 third_party/WebKit/Source/platform/testing/URLTestHelpers.h:74: WebURL registerMockedErrorURLLoad(const WebURL& fullURL); ...
3 years, 10 months ago (2017-02-08 06:47:20 UTC) #12
kinuko
https://codereview.chromium.org/2680723002/diff/40001/third_party/WebKit/Source/platform/testing/ScopedMockedURL.h File third_party/WebKit/Source/platform/testing/ScopedMockedURL.h (right): https://codereview.chromium.org/2680723002/diff/40001/third_party/WebKit/Source/platform/testing/ScopedMockedURL.h#newcode17 third_party/WebKit/Source/platform/testing/ScopedMockedURL.h:17: // unregisters it on destruction. This allows for a ...
3 years, 10 months ago (2017-02-08 08:21:48 UTC) #13
Takashi Toyoshima
https://codereview.chromium.org/2680723002/diff/40001/third_party/WebKit/Source/platform/testing/ScopedMockedURL.h File third_party/WebKit/Source/platform/testing/ScopedMockedURL.h (right): https://codereview.chromium.org/2680723002/diff/40001/third_party/WebKit/Source/platform/testing/ScopedMockedURL.h#newcode17 third_party/WebKit/Source/platform/testing/ScopedMockedURL.h:17: // unregisters it on destruction. This allows for a ...
3 years, 10 months ago (2017-02-08 10:33:14 UTC) #16
kinuko
lgtm
3 years, 10 months ago (2017-02-08 10:38:50 UTC) #18
kinuko
lgtm
3 years, 10 months ago (2017-02-08 10:38:52 UTC) #19
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/2680723002/80001
3 years, 10 months ago (2017-02-08 11:11:42 UTC) #21
commit-bot: I haz the power
3 years, 10 months ago (2017-02-08 13:22:40 UTC) #24
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/chromium/src/+/9ad7d8b5293d72bbf08f72d65bb0...

Powered by Google App Engine
This is Rietveld 408576698