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

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

Issue 16153008: Re-enable SSLUITest.TestGoodFrameNavigation and adjust to new behaviour now (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 7 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ssl/ssl_browser_tests.cc
===================================================================
--- chrome/browser/ssl/ssl_browser_tests.cc (revision 203003)
+++ chrome/browser/ssl/ssl_browser_tests.cc (working copy)
@@ -146,6 +146,20 @@
!!(entry->GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT));
}
+ void CheckBrokenAuthenticatedState(WebContents* tab) {
+ ASSERT_FALSE(tab->IsCrashed());
+ NavigationEntry* entry = tab->GetController().GetActiveEntry();
+ ASSERT_TRUE(entry);
+ EXPECT_EQ(content::PAGE_TYPE_NORMAL, entry->GetPageType());
+ EXPECT_EQ(content::SECURITY_STYLE_AUTHENTICATION_BROKEN,
+ entry->GetSSL().security_style);
+ EXPECT_EQ(0U, entry->GetSSL().cert_status & net::CERT_STATUS_ALL_ERRORS);
+ EXPECT_FALSE(!!(entry->GetSSL().content_status &
+ SSLStatus::DISPLAYED_INSECURE_CONTENT));
+ EXPECT_TRUE(
+ !!(entry->GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT));
+ }
+
void CheckAuthenticationBrokenState(WebContents* tab,
net::CertStatus error,
bool ran_insecure_content,
@@ -1293,7 +1307,7 @@
// - navigate to a bad HTTPS (expect unsafe content and filtered frame), then
// back
// - navigate to HTTP (expect insecure content), then back
-IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
+IN_PROC_BROWSER_TEST_F(SSLUITest, TestGoodFrameNavigation) {
ASSERT_TRUE(test_server()->Start());
ASSERT_TRUE(https_server_.Start());
ASSERT_TRUE(https_server_expired_.Start());
@@ -1378,8 +1392,8 @@
observer.Wait();
}
- // Our state should be insecure.
- CheckAuthenticatedState(tab, true);
+ // Our state should be unathenticated (in the ran mixed script sense)
+ CheckBrokenAuthenticatedState(tab);
// Go back, our state should be unchanged.
{
@@ -1389,7 +1403,8 @@
tab->GetController().GoBack();
observer.Wait();
}
- CheckAuthenticatedState(tab, true);
+
+ CheckBrokenAuthenticatedState(tab);
}
// From a bad HTTPS top frame:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698