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

Issue 2410023003: Add unit test for notifying WebContents when SSLStatus changes due to HTTP-bad (Closed)

Created:
4 years, 2 months ago by estark
Modified:
4 years, 2 months ago
Reviewers:
lgarron, elawrence, nasko
CC:
chromium-reviews, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add unit test for notifying WebContents when SSLStatus changes due to HTTP-bad We had a bug where we failed to notify that the SSL state has changed when there are events that trigger a "not secure" warning on HTTP pages (specifically, password and credit card fields). We were setting the appropriate flags on SSLStatus, but, due to an early return, we were never notifying the WebContents which meant the omnibox would never redraw (among other things). This bug was fixed somewhat unintentionally in https://codereview.chromium.org/2408393003/. This CL adds a unit test for it, and also includes some style fixes in SSLManager::UpdateEntry(). BUG=647560 Committed: https://crrev.com/79b7352086134008f856ac78753aeee3dc52a166 Cr-Commit-Position: refs/heads/master@{#424930}

Patch Set 1 #

Patch Set 2 : add test comments #

Total comments: 13

Patch Set 3 : elawrence comments #

Patch Set 4 : rebase #

Total comments: 3

Patch Set 5 : nasko comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+123 lines, -15 lines) Patch
M content/browser/ssl/ssl_manager.cc View 1 2 3 1 chunk +16 lines, -15 lines 0 comments Download
A content/browser/ssl/ssl_manager_unittest.cc View 1 2 3 4 1 chunk +106 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 29 (19 generated)
estark
elawrence + lgarron, could you please review? nasko: no need to review the whole change ...
4 years, 2 months ago (2016-10-11 21:29:18 UTC) #4
elawrence
Yay, unit-tests! I had one meaningful question around ssl_manager.cc:413 and a few style questions as ...
4 years, 2 months ago (2016-10-12 15:22:47 UTC) #7
estark
Thanks, Eric! https://codereview.chromium.org/2410023003/diff/20001/content/browser/ssl/ssl_manager.cc File content/browser/ssl/ssl_manager.cc (right): https://codereview.chromium.org/2410023003/diff/20001/content/browser/ssl/ssl_manager.cc#newcode124 content/browser/ssl/ssl_manager.cc:124: if (web_contents_impl->DisplayedInsecureContent()) On 2016/10/12 15:22:47, elawrence wrote: ...
4 years, 2 months ago (2016-10-12 16:20:17 UTC) #10
elawrence
Looks great to me. https://codereview.chromium.org/2410023003/diff/20001/content/browser/ssl/ssl_manager.cc File content/browser/ssl/ssl_manager.cc (right): https://codereview.chromium.org/2410023003/diff/20001/content/browser/ssl/ssl_manager.cc#newcode413 content/browser/ssl/ssl_manager.cc:413: if (!entry->GetSSL().Equals(original_ssl_status)) { On 2016/10/12 ...
4 years, 2 months ago (2016-10-12 16:28:58 UTC) #11
estark
https://codereview.chromium.org/2408393003/ just landed, which somewhat coincidentally fixes the same bug. Rebased on top of that, ...
4 years, 2 months ago (2016-10-12 22:11:55 UTC) #16
nasko
LGTM with a nit. https://codereview.chromium.org/2410023003/diff/60001/content/browser/ssl/ssl_manager.cc File content/browser/ssl/ssl_manager.cc (right): https://codereview.chromium.org/2410023003/diff/60001/content/browser/ssl/ssl_manager.cc#newcode374 content/browser/ssl/ssl_manager.cc:374: // possibly have insecure content. ...
4 years, 2 months ago (2016-10-12 23:45:53 UTC) #19
estark
https://codereview.chromium.org/2410023003/diff/60001/content/browser/ssl/ssl_manager_unittest.cc File content/browser/ssl/ssl_manager_unittest.cc (right): https://codereview.chromium.org/2410023003/diff/60001/content/browser/ssl/ssl_manager_unittest.cc#newcode60 content/browser/ssl/ssl_manager_unittest.cc:60: ->NavigateAndCommit(GURL("http://example.test")); On 2016/10/12 23:45:53, nasko (slow) wrote: > nit: ...
4 years, 2 months ago (2016-10-13 00:49:25 UTC) #22
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/2410023003/80001
4 years, 2 months ago (2016-10-13 00:50:04 UTC) #25
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 2 months ago (2016-10-13 01:36:21 UTC) #27
commit-bot: I haz the power
4 years, 2 months ago (2016-10-13 01:38:34 UTC) #29
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/79b7352086134008f856ac78753aeee3dc52a166
Cr-Commit-Position: refs/heads/master@{#424930}

Powered by Google App Engine
This is Rietveld 408576698