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

Issue 1227943002: Allow browser tests to use a MockCertVerifier (Closed)

Created:
5 years, 5 months ago by estark
Modified:
5 years, 4 months ago
Reviewers:
mmenke, Ryan Sleevi
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow browser tests to use a MockCertVerifier Introduces a ProfileIOData::SetCertVerifierForTesting() hook, called by the CertVerifierBrowserTest class. CertVerifierBrowserTest tests can use mock_cert_verifier() to set mock cert verify results. BUG= Committed: https://crrev.com/b1ee16776c38e71dfecf783273bd535bea9b16e8 Cr-Commit-Position: refs/heads/master@{#342038}

Patch Set 1 #

Patch Set 2 : style fixes, comments #

Total comments: 9

Patch Set 3 : Make factory-setting test-only; remove CreateWithVerifyProc #

Patch Set 4 : minor cleanup #

Patch Set 5 : revert accidental CertVerifyResult change #

Patch Set 6 : rebase #

Patch Set 7 : move factory-setter to ProfileIOData to work with ChromeOS #

Total comments: 4

Patch Set 8 : use a single CertVerifier instead of a factory #

Patch Set 9 : some cleanup #

Total comments: 18

Patch Set 10 : rebase #

Patch Set 11 : rsleevi, mmenke comments #

Total comments: 2

Patch Set 12 : relocate CertVerifierBrowserTest #

Total comments: 2

Patch Set 13 : fix username_hash_, use_system_key_slot_ #

Total comments: 2

Patch Set 14 : use two OS_CHROMEOS blocks #

Patch Set 15 : put the files in the right .gypi #

Unified diffs Side-by-side diffs Delta from patch set Stats (+121 lines, -15 lines) Patch
M chrome/browser/profiles/profile_io_data.h View 1 2 3 4 5 6 7 8 2 chunks +4 lines, -1 line 0 comments Download
M chrome/browser/profiles/profile_io_data.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 4 chunks +30 lines, -14 lines 0 comments Download
A chrome/browser/ssl/cert_verifier_browser_test.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +37 lines, -0 lines 0 comments Download
A chrome/browser/ssl/cert_verifier_browser_test.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +26 lines, -0 lines 0 comments Download
M chrome/browser/ssl/ssl_browser_tests.cc View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +22 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 44 (11 generated)
estark
mmenke: as discussed over email (with Ryan, cc'ed), this is an attempt to let browser ...
5 years, 5 months ago (2015-07-09 17:27:21 UTC) #2
mmenke
I'll start looking at this tomorrow (Or possibly later today). On 2015/07/09 17:27:21, estark wrote: ...
5 years, 5 months ago (2015-07-09 18:35:20 UTC) #3
Ryan Sleevi
https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h File net/cert/cert_verifier.h (right): https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h#newcode134 net/cert/cert_verifier.h:134: static CertVerifier* CreateWithVerifyProc(CertVerifyProc* cert_verify_proc); Why the need to expose ...
5 years, 5 months ago (2015-07-09 19:35:28 UTC) #5
Ryan Sleevi
https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h File net/cert/cert_verifier.h (right): https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h#newcode155 net/cert/cert_verifier.h:155: static CertVerifierFactory* cert_verifier_factory_; There's (generally) no need for such ...
5 years, 5 months ago (2015-07-09 19:40:27 UTC) #6
estark
https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h File net/cert/cert_verifier.h (right): https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h#newcode139 net/cert/cert_verifier.h:139: class NET_EXPORT CertVerifierFactory { On 2015/07/09 19:35:27, Ryan Sleevi ...
5 years, 5 months ago (2015-07-09 20:11:50 UTC) #7
estark
https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h File net/cert/cert_verifier.h (right): https://codereview.chromium.org/1227943002/diff/20001/net/cert/cert_verifier.h#newcode134 net/cert/cert_verifier.h:134: static CertVerifier* CreateWithVerifyProc(CertVerifyProc* cert_verify_proc); On 2015/07/09 19:35:28, Ryan Sleevi ...
5 years, 5 months ago (2015-07-09 20:14:24 UTC) #8
Ryan Sleevi
On 2015/07/09 20:11:50, estark wrote: > Email thread with you me and Matt titled "MockCertVerifier". ...
5 years, 5 months ago (2015-07-10 12:52:26 UTC) #9
estark
On 2015/07/10 12:52:26, Ryan Sleevi (slow through 7-15 wrote: > On 2015/07/09 20:11:50, estark wrote: ...
5 years, 5 months ago (2015-07-17 00:39:46 UTC) #10
estark
On 2015/07/17 00:39:46, estark wrote: > On 2015/07/10 12:52:26, Ryan Sleevi (slow through 7-15 wrote: ...
5 years, 5 months ago (2015-07-17 00:44:48 UTC) #11
estark
On 2015/07/17 00:44:48, estark wrote: > On 2015/07/17 00:39:46, estark wrote: > > On 2015/07/10 ...
5 years, 5 months ago (2015-07-17 00:49:17 UTC) #12
estark
Friendly ping to rsleevi, though I think you might already have this on your radar. ...
5 years, 4 months ago (2015-08-03 21:33:53 UTC) #13
estark
Discussed with Ryan out-of-band; PTAL at the latest patch set, which sets the factory via ...
5 years, 4 months ago (2015-08-04 00:58:04 UTC) #14
Ryan Sleevi
On 2015/08/04 00:58:04, estark wrote: > Discussed with Ryan out-of-band; PTAL at the latest patch ...
5 years, 4 months ago (2015-08-04 08:28:36 UTC) #15
Ryan Sleevi
https://codereview.chromium.org/1227943002/diff/120001/chrome/browser/profiles/profile_io_data.h File chrome/browser/profiles/profile_io_data.h (right): https://codereview.chromium.org/1227943002/diff/120001/chrome/browser/profiles/profile_io_data.h#newcode563 chrome/browser/profiles/profile_io_data.h:563: mutable scoped_ptr<net::CertVerifier> cert_verifier_; Since policy_cert_verifier_ points to this (line ...
5 years, 4 months ago (2015-08-04 08:28:44 UTC) #16
estark
Ok, I like option #1, since it's simple and gets the job done, and I ...
5 years, 4 months ago (2015-08-04 17:44:38 UTC) #17
Ryan Sleevi
LGTM, but could mmenke spot-check to make sure I didn't miss anything obvious :) https://codereview.chromium.org/1227943002/diff/160001/chrome/browser/profiles/profile_io_data.cc ...
5 years, 4 months ago (2015-08-04 18:24:34 UTC) #18
mmenke
This looks reasonable to me (Well...to the extent that adding more code to ProfileIOData is ...
5 years, 4 months ago (2015-08-04 19:01:23 UTC) #19
estark
https://codereview.chromium.org/1227943002/diff/160001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1227943002/diff/160001/chrome/browser/profiles/profile_io_data.cc#newcode166 chrome/browser/profiles/profile_io_data.cc:166: } On 2015/08/04 18:24:34, Ryan Sleevi wrote: > This ...
5 years, 4 months ago (2015-08-04 19:32:20 UTC) #20
estark
sky@: could you please review the files in //chrome/test/base? Thanks!
5 years, 4 months ago (2015-08-04 19:37:25 UTC) #22
sky
https://codereview.chromium.org/1227943002/diff/200001/chrome/test/base/cert_verifier_browser_test.h File chrome/test/base/cert_verifier_browser_test.h (right): https://codereview.chromium.org/1227943002/diff/200001/chrome/test/base/cert_verifier_browser_test.h#newcode5 chrome/test/base/cert_verifier_browser_test.h:5: #ifndef CHROME_TEST_BASE_CERT_VERIFIER_BROWSER_TEST_H_ Can this test live in chrome/browser/ssl? Or ...
5 years, 4 months ago (2015-08-04 20:06:04 UTC) #23
estark
https://codereview.chromium.org/1227943002/diff/200001/chrome/test/base/cert_verifier_browser_test.h File chrome/test/base/cert_verifier_browser_test.h (right): https://codereview.chromium.org/1227943002/diff/200001/chrome/test/base/cert_verifier_browser_test.h#newcode5 chrome/test/base/cert_verifier_browser_test.h:5: #ifndef CHROME_TEST_BASE_CERT_VERIFIER_BROWSER_TEST_H_ On 2015/08/04 20:06:04, sky wrote: > Can ...
5 years, 4 months ago (2015-08-04 20:52:08 UTC) #24
mmenke
https://codereview.chromium.org/1227943002/diff/220001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1227943002/diff/220001/chrome/browser/profiles/profile_io_data.cc#newcode1110 chrome/browser/profiles/profile_io_data.cc:1110: username_hash_ = profile_params_->username_hash; Should all of this be gated ...
5 years, 4 months ago (2015-08-04 21:06:23 UTC) #26
estark
https://codereview.chromium.org/1227943002/diff/220001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1227943002/diff/220001/chrome/browser/profiles/profile_io_data.cc#newcode1110 chrome/browser/profiles/profile_io_data.cc:1110: username_hash_ = profile_params_->username_hash; On 2015/08/04 21:06:22, mmenke wrote: > ...
5 years, 4 months ago (2015-08-04 21:14:23 UTC) #27
mmenke
https://codereview.chromium.org/1227943002/diff/240001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1227943002/diff/240001/chrome/browser/profiles/profile_io_data.cc#newcode1110 chrome/browser/profiles/profile_io_data.cc:1110: EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); I think two OS_CHROMEOS blocks is a little ...
5 years, 4 months ago (2015-08-05 20:59:13 UTC) #28
estark
https://codereview.chromium.org/1227943002/diff/240001/chrome/browser/profiles/profile_io_data.cc File chrome/browser/profiles/profile_io_data.cc (right): https://codereview.chromium.org/1227943002/diff/240001/chrome/browser/profiles/profile_io_data.cc#newcode1110 chrome/browser/profiles/profile_io_data.cc:1110: EnableNSSSystemKeySlotForResourceContext(resource_context_.get()); On 2015/08/05 20:59:13, mmenke wrote: > I think ...
5 years, 4 months ago (2015-08-05 21:09:53 UTC) #29
mmenke
On 2015/08/05 21:09:53, estark wrote: > https://codereview.chromium.org/1227943002/diff/240001/chrome/browser/profiles/profile_io_data.cc > File chrome/browser/profiles/profile_io_data.cc (right): > > https://codereview.chromium.org/1227943002/diff/240001/chrome/browser/profiles/profile_io_data.cc#newcode1110 > ...
5 years, 4 months ago (2015-08-05 21:11:51 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1227943002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1227943002/260001
5 years, 4 months ago (2015-08-05 21:16:48 UTC) #33
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/100393)
5 years, 4 months ago (2015-08-05 21:37:11 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1227943002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1227943002/280001
5 years, 4 months ago (2015-08-05 21:46:29 UTC) #38
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/89270)
5 years, 4 months ago (2015-08-05 22:52:13 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1227943002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1227943002/280001
5 years, 4 months ago (2015-08-06 01:08:58 UTC) #42
commit-bot: I haz the power
Committed patchset #15 (id:280001)
5 years, 4 months ago (2015-08-06 01:15:31 UTC) #43
commit-bot: I haz the power
5 years, 4 months ago (2015-08-06 01:16:12 UTC) #44
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/b1ee16776c38e71dfecf783273bd535bea9b16e8
Cr-Commit-Position: refs/heads/master@{#342038}

Powered by Google App Engine
This is Rietveld 408576698