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

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

Issue 321253003: Ensure show/hide are properly called on interstitial pages if present. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test compilation, add test case for the bug. Created 6 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
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_browser_tests.cc
diff --git a/chrome/browser/ssl/ssl_browser_tests.cc b/chrome/browser/ssl/ssl_browser_tests.cc
index 5ba3244b213f5aa5b7072afaacc7a7d879539b6f..416752eb6e844076d14ace1dd1e1b9fe87448afb 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -30,6 +30,7 @@
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/render_view_host.h"
+#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/security_style.h"
@@ -1750,6 +1751,31 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, InterstitialNotAffectedByContentSettings) {
ASSERT_TRUE(result);
}
+// Verifies that switching tabs, while showing interstitial page, will not
+// affect the visibility of the interestitial.
+// https://crbug.com/381439
+IN_PROC_BROWSER_TEST_F(SSLUITest, InterstitialNotAffectedByHideShow) {
+ ASSERT_TRUE(https_server_expired_.Start());
+ WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents();
+ EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing());
+ ui_test_utils::NavigateToURL(
+ browser(), https_server_expired_.GetURL("files/ssl/google.html"));
+ CheckAuthenticationBrokenState(
+ tab, net::CERT_STATUS_DATE_INVALID, AuthState::SHOWING_INTERSTITIAL);
+ EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing());
+
+ AddTabAtIndex(0,
+ https_server_.GetURL("files/ssl/google.html"),
+ content::PAGE_TRANSITION_TYPED);
+ EXPECT_EQ(2, browser()->tab_strip_model()->count());
+ EXPECT_EQ(0, browser()->tab_strip_model()->active_index());
+ EXPECT_EQ(tab, browser()->tab_strip_model()->GetWebContentsAt(1));
+ EXPECT_FALSE(tab->GetRenderWidgetHostView()->IsShowing());
+
+ browser()->tab_strip_model()->ActivateTabAt(1, true);
+ EXPECT_TRUE(tab->GetRenderWidgetHostView()->IsShowing());
+}
+
// TODO(jcampan): more tests to do below.
// Visit a page over https that contains a frame with a redirect.
« no previous file with comments | « no previous file | content/browser/site_per_process_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698