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

Issue 2113893005: Adding tests for WebContent.DownloadImage() (Closed)

Created:
4 years, 5 months ago by Zhiqiang Zhang (Slow)
Modified:
4 years, 5 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, nasko+codewatch_chromium.org, palmer
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Adding tests for WebContent.DownloadImage() This CL adds tests to check that WebContent.DownloadImage() allows HTTP scheme but denies file scheme. BUG=626281 Committed: https://crrev.com/b94c2c360f20d9b2aef20b2efcf0ac406b9ccaba Cr-Commit-Position: refs/heads/master@{#404120}

Patch Set 1 #

Total comments: 4

Patch Set 2 : addressed pkotwicz's comments #

Total comments: 2

Patch Set 3 : addressed pkotwicz's comments #

Total comments: 10

Patch Set 4 : fixed nits #

Total comments: 4

Patch Set 5 : fixed nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -0 lines) Patch
M content/browser/web_contents/web_contents_impl_browsertest.cc View 1 2 3 4 1 chunk +58 lines, -0 lines 0 comments Download

Messages

Total messages: 27 (8 generated)
Zhiqiang Zhang (Slow)
Hi pkotwicz@, can you review this CL for adding image downloader tests? I wrote another ...
4 years, 5 months ago (2016-07-04 10:34:45 UTC) #3
pkotwicz
Thank you for adding tests. I think that it would be worth checking that the ...
4 years, 5 months ago (2016-07-04 15:27:52 UTC) #4
pkotwicz
Sorry, I am looking at your CL in more detail and I don't think that ...
4 years, 5 months ago (2016-07-04 15:30:31 UTC) #5
Zhiqiang Zhang (Slow)
On 2016/07/04 15:30:31, pkotwicz wrote: > Sorry, I am looking at your CL in more ...
4 years, 5 months ago (2016-07-04 16:21:54 UTC) #6
pkotwicz
https://codereview.chromium.org/2113893005/diff/1/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/1/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1173 content/browser/web_contents/web_contents_impl_browsertest.cc:1173: public base::RefCountedThreadSafe<DownloadImageObserver> { Why is DownloadImageObserver ref counted? The ...
4 years, 5 months ago (2016-07-04 17:17:01 UTC) #7
pkotwicz
4 years, 5 months ago (2016-07-04 17:17:09 UTC) #8
Zhiqiang Zhang (Slow)
PTAL, addressed comments. https://codereview.chromium.org/2113893005/diff/1/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/1/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1173 content/browser/web_contents/web_contents_impl_browsertest.cc:1173: public base::RefCountedThreadSafe<DownloadImageObserver> { On 2016/07/04 17:17:01, ...
4 years, 5 months ago (2016-07-04 19:34:27 UTC) #9
pkotwicz
https://codereview.chromium.org/2113893005/diff/20001/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/20001/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1223 content/browser/web_contents/web_contents_impl_browsertest.cc:1223: DownloadImage_HttpPage_HttpImage) { I tried this test locally and it ...
4 years, 5 months ago (2016-07-04 20:17:17 UTC) #10
Zhiqiang Zhang (Slow)
PTAL. https://codereview.chromium.org/2113893005/diff/20001/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/20001/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1223 content/browser/web_contents/web_contents_impl_browsertest.cc:1223: DownloadImage_HttpPage_HttpImage) { On 2016/07/04 20:17:17, pkotwicz wrote: > ...
4 years, 5 months ago (2016-07-05 15:46:58 UTC) #11
pkotwicz
https://codereview.chromium.org/2113893005/diff/40001/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/40001/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1202 content/browser/web_contents/web_contents_impl_browsertest.cc:1202: OnFinishDownloadImage(_, Ne(expected_http_status), _, _, _)) Can you replace "Ne(expected_http_status)" ...
4 years, 5 months ago (2016-07-05 18:00:36 UTC) #12
Zhiqiang Zhang (Slow)
PTAL, fixed nits. +jochen for approval. https://codereview.chromium.org/2113893005/diff/40001/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/40001/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1202 content/browser/web_contents/web_contents_impl_browsertest.cc:1202: OnFinishDownloadImage(_, Ne(expected_http_status), _, ...
4 years, 5 months ago (2016-07-05 18:12:44 UTC) #14
pkotwicz
LGTM. Someone else will need to look at the GMock specific stuff though - in ...
4 years, 5 months ago (2016-07-05 19:05:04 UTC) #15
Zhiqiang Zhang (Slow)
https://codereview.chromium.org/2113893005/diff/60001/content/browser/web_contents/web_contents_impl_browsertest.cc File content/browser/web_contents/web_contents_impl_browsertest.cc (right): https://codereview.chromium.org/2113893005/diff/60001/content/browser/web_contents/web_contents_impl_browsertest.cc#newcode1188 content/browser/web_contents/web_contents_impl_browsertest.cc:1188: using ::testing::Ne; On 2016/07/05 19:05:04, pkotwicz wrote: > Nit: ...
4 years, 5 months ago (2016-07-05 19:23:20 UTC) #16
jochen (gone - plz use gerrit)
have you considered adding a unit test as opposed to browser tests with mocks? what's ...
4 years, 5 months ago (2016-07-06 11:26:46 UTC) #17
Zhiqiang Zhang (Slow)
On 2016/07/06 11:26:46, jochen wrote: > have you considered adding a unit test as opposed ...
4 years, 5 months ago (2016-07-06 13:25:36 UTC) #18
jochen (gone - plz use gerrit)
lgtm
4 years, 5 months ago (2016-07-07 08:06:51 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/2113893005/80001
4 years, 5 months ago (2016-07-07 10:03:25 UTC) #23
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 5 months ago (2016-07-07 10:35:36 UTC) #25
commit-bot: I haz the power
4 years, 5 months ago (2016-07-07 10:37:38 UTC) #27
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/b94c2c360f20d9b2aef20b2efcf0ac406b9ccaba
Cr-Commit-Position: refs/heads/master@{#404120}

Powered by Google App Engine
This is Rietveld 408576698