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

Unified Diff: chrome/browser/ssl/security_state_tab_helper_browser_tests.cc

Issue 2542533004: Override DevTools security summary when a Safe Browsing warning shows. (Closed)
Patch Set: Redefine event parameter (optional instead of nullable) for Closure Compiler Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
diff --git a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
index 3ab197b70de0eb3b8a0c54a9e1331aeb75bb2f5e..f28a529dea48c86b0aea925b54e2fc879a8c0620 100644
--- a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
+++ b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
@@ -1543,6 +1543,7 @@ IN_PROC_BROWSER_TEST_F(SecurityStyleChangedTest, SecurityStyleChangedObserver) {
EXPECT_TRUE(observer.latest_explanations().info_explanations.empty());
EXPECT_FALSE(observer.latest_explanations().ran_mixed_content);
EXPECT_FALSE(observer.latest_explanations().displayed_mixed_content);
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
// Visit an (otherwise valid) HTTPS page that displays mixed content.
std::string replacement_path;
@@ -1565,6 +1566,7 @@ IN_PROC_BROWSER_TEST_F(SecurityStyleChangedTest, SecurityStyleChangedObserver) {
EXPECT_TRUE(mixed_content_explanation.scheme_is_cryptographic);
EXPECT_FALSE(observer.latest_explanations().pkp_bypassed);
EXPECT_TRUE(observer.latest_explanations().info_explanations.empty());
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
EXPECT_TRUE(mixed_content_explanation.displayed_mixed_content);
EXPECT_FALSE(mixed_content_explanation.ran_mixed_content);
EXPECT_EQ(blink::WebSecurityStyleUnauthenticated,
@@ -1590,6 +1592,8 @@ IN_PROC_BROWSER_TEST_F(SecurityStyleChangedTest, SecurityStyleChangedObserver) {
EXPECT_TRUE(observer.latest_explanations().info_explanations.empty());
EXPECT_FALSE(observer.latest_explanations().displayed_mixed_content);
EXPECT_FALSE(observer.latest_explanations().ran_mixed_content);
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
estark 2016/12/07 01:00:09 redundant
// Before clicking through, navigate to a different page, and then go
// back to the interstitial.
@@ -1608,6 +1612,7 @@ IN_PROC_BROWSER_TEST_F(SecurityStyleChangedTest, SecurityStyleChangedObserver) {
EXPECT_TRUE(observer.latest_explanations().info_explanations.empty());
EXPECT_FALSE(observer.latest_explanations().displayed_mixed_content);
EXPECT_FALSE(observer.latest_explanations().ran_mixed_content);
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
// After going back to the interstitial, an event for a broken lock
// icon should fire again.
@@ -1624,6 +1629,7 @@ IN_PROC_BROWSER_TEST_F(SecurityStyleChangedTest, SecurityStyleChangedObserver) {
EXPECT_TRUE(observer.latest_explanations().info_explanations.empty());
EXPECT_FALSE(observer.latest_explanations().displayed_mixed_content);
EXPECT_FALSE(observer.latest_explanations().ran_mixed_content);
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
// Since the next expected style is the same as the previous, clear
// the observer (to make sure that the event fires twice and we don't
@@ -1644,6 +1650,7 @@ IN_PROC_BROWSER_TEST_F(SecurityStyleChangedTest, SecurityStyleChangedObserver) {
EXPECT_TRUE(observer.latest_explanations().info_explanations.empty());
EXPECT_FALSE(observer.latest_explanations().displayed_mixed_content);
EXPECT_FALSE(observer.latest_explanations().ran_mixed_content);
+ EXPECT_TRUE(observer.latest_explanations().summary.empty());
}
// Visit a valid HTTPS page, then a broken HTTPS page, and then go back,

Powered by Google App Engine
This is Rietveld 408576698