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

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

Issue 2214293003: Revert of Remove usage of SSLStatus in RenderFrameImpl. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 155cd252ec7b9b22483a96c28aa18c6b820d76ee..68405e7ac23441f6e9ff6804f8be9396d2d9aecd 100644
--- a/chrome/browser/ssl/ssl_browser_tests.cc
+++ b/chrome/browser/ssl/ssl_browser_tests.cc
@@ -154,11 +154,7 @@
DISPLAYED_INSECURE_CONTENT = 1 << 0,
RAN_INSECURE_CONTENT = 1 << 1,
SHOWING_INTERSTITIAL = 1 << 2,
- SHOWING_ERROR = 1 << 3,
- // Useful when a favicon load may or may not have finished loading, to avoid
- // checking if a page displayed insecure content.
- // TODO(estark): remove this once http://crbug.com/634171 is fixed.
- DONT_CHECK_DISPLAYED_INSECURE_CONTENT = 1 << 4,
+ SHOWING_ERROR = 1 << 3
};
void Check(const NavigationEntry& entry, int expected_authentication_state) {
@@ -172,16 +168,11 @@
entry.GetPageType());
}
- if (!(expected_authentication_state &
- AuthState::DONT_CHECK_DISPLAYED_INSECURE_CONTENT)) {
- bool displayed_insecure_content =
- !!(entry.GetSSL().content_status &
- SSLStatus::DISPLAYED_INSECURE_CONTENT);
- EXPECT_EQ(
- !!(expected_authentication_state &
- AuthState::DISPLAYED_INSECURE_CONTENT),
- displayed_insecure_content);
- }
+ bool displayed_insecure_content =
+ !!(entry.GetSSL().content_status & SSLStatus::DISPLAYED_INSECURE_CONTENT);
+ EXPECT_EQ(
+ !!(expected_authentication_state & AuthState::DISPLAYED_INSECURE_CONTENT),
+ displayed_insecure_content);
bool ran_insecure_content =
!!(entry.GetSSL().content_status & SSLStatus::RAN_INSECURE_CONTENT);
@@ -1831,6 +1822,14 @@
tab, net::CERT_STATUS_COMMON_NAME_INVALID, AuthState::NONE);
}
+#if defined(OS_CHROMEOS)
+// This test seems to be flaky and hang on chromiumos.
+// http://crbug.com/84419
+#define MAYBE_TestRefNavigation DISABLED_TestRefNavigation
+#else
+#define MAYBE_TestRefNavigation TestRefNavigation
+#endif
+
// Test that navigating to a #ref does not change a bad security state.
IN_PROC_BROWSER_TEST_F(SSLUITest, TestRefNavigation) {
ASSERT_TRUE(https_server_expired_.Start());
@@ -1852,8 +1851,7 @@
browser(), https_server_expired_.GetURL("/ssl/page_with_refs.html#jp"));
CheckAuthenticationBrokenState(
- tab, net::CERT_STATUS_DATE_INVALID,
- AuthState::DONT_CHECK_DISPLAYED_INSECURE_CONTENT);
+ tab, net::CERT_STATUS_DATE_INVALID, AuthState::NONE);
}
// Tests that closing a page that opened a pop-up with an interstitial does not
@@ -2171,8 +2169,7 @@
// We should still be authentication broken.
CheckAuthenticationBrokenState(
- tab, net::CERT_STATUS_DATE_INVALID,
- AuthState::DONT_CHECK_DISPLAYED_INSECURE_CONTENT);
+ tab, net::CERT_STATUS_DATE_INVALID, AuthState::NONE);
}
// From an HTTP top frame, navigate to good and bad HTTPS (security state should
@@ -2287,10 +2284,8 @@
ui_test_utils::NavigateToURL(
browser(), https_server_.GetURL(page_with_unsafe_worker_path));
CheckWorkerLoadResult(tab, true); // Worker loads insecure content
- CheckAuthenticationBrokenState(
- tab, CertError::NONE,
- AuthState::RAN_INSECURE_CONTENT |
- AuthState::DONT_CHECK_DISPLAYED_INSECURE_CONTENT);
+ CheckAuthenticationBrokenState(tab, CertError::NONE,
+ AuthState::RAN_INSECURE_CONTENT);
}
// Visits a page with unsafe content and makes sure that if a user exception to
@@ -2329,9 +2324,8 @@
EXPECT_TRUE(content::ExecuteScriptAndExtractBool(
tab, "window.domAutomationController.send(IsFooSet());", &js_result));
EXPECT_TRUE(js_result);
- CheckAuthenticationBrokenState(
- tab, net::CERT_STATUS_COMMON_NAME_INVALID,
- AuthState::DONT_CHECK_DISPLAYED_INSECURE_CONTENT);
+ CheckAuthenticationBrokenState(tab, net::CERT_STATUS_COMMON_NAME_INVALID,
+ AuthState::NONE);
}
// Like the test above, but only displaying inactive content (an image).
« 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