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

Unified Diff: chrome/browser/ui/browser_browsertest.cc

Issue 1207943002: Trigger DidChangeVisisbleSSLState() after OverrideEntry() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 6 months 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/ui/browser_browsertest.cc
diff --git a/chrome/browser/ui/browser_browsertest.cc b/chrome/browser/ui/browser_browsertest.cc
index 73ae3e2e1446401fadebc506a17095c46c4f383d..9682b1bdcc9fae3066c6a5e76fea151f99c0accf 100644
--- a/chrome/browser/ui/browser_browsertest.cc
+++ b/chrome/browser/ui/browser_browsertest.cc
@@ -357,6 +357,10 @@ class SecurityStyleTestObserver : public WebContentsObserver {
return latest_security_style_;
}
+ void ClearLatestSecurityStyle() {
+ latest_security_style_ = content::SECURITY_STYLE_UNKNOWN;
+ }
+
private:
content::SecurityStyle latest_security_style_;
@@ -2864,7 +2868,13 @@ IN_PROC_BROWSER_TEST_F(BrowserTest, SecurityStyleChangedObserver) {
GURL expired_url(https_test_server_expired.GetURL(std::string()));
ui_test_utils::NavigateToURL(browser(), expired_url);
+ EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATION_BROKEN,
nasko 2015/06/25 12:59:32 We expect to have an interstitial page being displ
estark 2015/06/25 14:54:44 Done.
+ observer.latest_security_style());
+
+ observer.ClearLatestSecurityStyle();
+
ProceedThroughInterstitial(web_contents);
+
nasko 2015/06/25 12:59:32 nit: Why the extra empty line here?
estark 2015/06/25 14:54:44 Done.
EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATION_BROKEN,
observer.latest_security_style());
nasko 2015/06/25 12:59:32 Do we have a test that ensures that if the user ty
estark 2015/06/25 14:54:44 Going back (as in "clicking the back button") does
nasko 2015/06/26 08:53:04 I meant this one indeed. Thanks for adding it!
}

Powered by Google App Engine
This is Rietveld 408576698