Commit 790a91b2 authored by cevans@chromium.org's avatar cevans@chromium.org

Re-enable SSLUITest.TestGoodFrameNavigation and adjust to new behaviour now

that the Blink roll is sticking.

BUG=238484
R=abarth@chromium.org, thestig@chromium.org

Review URL: https://codereview.chromium.org/16153008

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@203039 0039d316-1c4b-4281-b951-d872f2087c98
parent 1cb9beb7
...@@ -146,6 +146,20 @@ class SSLUITest : public InProcessBrowserTest { ...@@ -146,6 +146,20 @@ class SSLUITest : public InProcessBrowserTest {
!!(entry->GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT)); !!(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, void CheckAuthenticationBrokenState(WebContents* tab,
net::CertStatus error, net::CertStatus error,
bool ran_insecure_content, bool ran_insecure_content,
...@@ -1293,7 +1307,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestConnectToBadPort) { ...@@ -1293,7 +1307,7 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, TestConnectToBadPort) {
// - navigate to a bad HTTPS (expect unsafe content and filtered frame), then // - navigate to a bad HTTPS (expect unsafe content and filtered frame), then
// back // back
// - navigate to HTTP (expect insecure content), 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(test_server()->Start());
ASSERT_TRUE(https_server_.Start()); ASSERT_TRUE(https_server_.Start());
ASSERT_TRUE(https_server_expired_.Start()); ASSERT_TRUE(https_server_expired_.Start());
...@@ -1378,8 +1392,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) { ...@@ -1378,8 +1392,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
observer.Wait(); observer.Wait();
} }
// Our state should be insecure. // Our state should be unathenticated (in the ran mixed script sense)
CheckAuthenticatedState(tab, true); CheckBrokenAuthenticatedState(tab);
// Go back, our state should be unchanged. // Go back, our state should be unchanged.
{ {
...@@ -1389,7 +1403,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) { ...@@ -1389,7 +1403,8 @@ IN_PROC_BROWSER_TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
tab->GetController().GoBack(); tab->GetController().GoBack();
observer.Wait(); observer.Wait();
} }
CheckAuthenticatedState(tab, true);
CheckBrokenAuthenticatedState(tab);
} }
// From a bad HTTPS top frame: // From a bad HTTPS top frame:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment