summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ssl
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 03:42:50 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-16 03:42:50 +0000
commit1d4d6c674e6b3a932fbd4c33e8067e88031624d1 (patch)
tree31c8ccbf25c506bbc32861ba02cabbea5ca3fb40 /chrome/browser/ssl
parentd82ed61e761310023c71800a03e03395197c5b64 (diff)
downloadchromium_src-1d4d6c674e6b3a932fbd4c33e8067e88031624d1.zip
chromium_src-1d4d6c674e6b3a932fbd4c33e8067e88031624d1.tar.gz
chromium_src-1d4d6c674e6b3a932fbd4c33e8067e88031624d1.tar.bz2
Removed mixed content options. Turns out extremely few users changed the default.
R=beng BUG=None TEST=Go to options dialog and notice that the mixed content option is gone. Review URL: http://codereview.chromium.org/126106 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18479 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ssl')
-rw-r--r--chrome/browser/ssl/ssl_policy.cc5
-rw-r--r--chrome/browser/ssl/ssl_uitest.cc66
2 files changed, 1 insertions, 70 deletions
diff --git a/chrome/browser/ssl/ssl_policy.cc b/chrome/browser/ssl/ssl_policy.cc
index b453092..d1b3bf3 100644
--- a/chrome/browser/ssl/ssl_policy.cc
+++ b/chrome/browser/ssl/ssl_policy.cc
@@ -113,10 +113,7 @@ void SSLPolicy::OnCertError(SSLCertErrorHandler* handler) {
}
void SSLPolicy::OnMixedContent(SSLMixedContentHandler* handler) {
- // Get the user's mixed content preference.
- PrefService* prefs = handler->GetTabContents()->profile()->GetPrefs();
- FilterPolicy::Type filter_policy =
- FilterPolicy::FromInt(prefs->GetInteger(prefs::kMixedContentFiltering));
+ FilterPolicy::Type filter_policy = FilterPolicy::DONT_FILTER;
// If the user has added an exception, doctor the |filter_policy|.
std::string host = GURL(handler->main_frame_origin()).host();
diff --git a/chrome/browser/ssl/ssl_uitest.cc b/chrome/browser/ssl/ssl_uitest.cc
index 00bd8bd..a29d1c7 100644
--- a/chrome/browser/ssl/ssl_uitest.cc
+++ b/chrome/browser/ssl/ssl_uitest.cc
@@ -271,72 +271,6 @@ TEST_F(SSLUITest, TestMixedContents) {
EXPECT_EQ(NavigationEntry::SSLStatus::MIXED_CONTENT, mixed_content_state);
}
-// Visits a page with mixed content.
-TEST_F(SSLUITest, TestMixedContentsFilterAll) {
- scoped_refptr<HTTPSTestServer> https_server = GoodCertServer();
- scoped_refptr<HTTPTestServer> http_server = PlainServer();
- if (HasFailure())
- return;
-
- // Now select the block mixed-content pref and reload the page.
- scoped_refptr<BrowserProxy> browser_proxy(automation()->GetBrowserWindow(0));
- EXPECT_TRUE(browser_proxy.get());
- EXPECT_TRUE(browser_proxy->SetIntPreference(prefs::kMixedContentFiltering,
- FilterPolicy::FILTER_ALL));
-
- // Load a page with mixed-content, we've overridden our filtering policy so
- // we won't load the mixed content by default.
- scoped_refptr<TabProxy> tab(GetActiveTabProxy());
- NavigateTab(
- tab.get(),
- https_server->TestServerPageW(
- L"files/ssl/page_with_mixed_contents.html"));
- NavigationEntry::PageType page_type;
- EXPECT_TRUE(tab->GetPageType(&page_type));
- EXPECT_EQ(NavigationEntry::NORMAL_PAGE, page_type);
-
- // The image should be filtered.
- int img_width;
- EXPECT_TRUE(tab->ExecuteAndExtractInt(L"",
- L"window.domAutomationController.send(ImageWidth());",
- &img_width));
- // In order to check that the image was not loaded, we check its width.
- // The actual image (Google logo) is 114 pixels wide, we assume the broken
- // image is less than 100.
- EXPECT_GT(100, img_width);
-
- SecurityStyle security_style;
- int cert_status;
- int mixed_content_state;
- // The state should be OK since we are not showing the resource.
- EXPECT_TRUE(tab->GetSecurityState(&security_style, &cert_status,
- &mixed_content_state));
- EXPECT_EQ(SECURITY_STYLE_AUTHENTICATED, security_style);
- EXPECT_EQ(0, cert_status & net::CERT_STATUS_ALL_ERRORS);
- EXPECT_EQ(NavigationEntry::SSLStatus::NORMAL_CONTENT, mixed_content_state);
-
- // There should be one info-bar to show the mixed-content.
- int info_bar_count = 0;
- EXPECT_TRUE(tab->GetSSLInfoBarCount(&info_bar_count));
- EXPECT_EQ(1, info_bar_count);
-
- // Activate the link on the info-bar to show the mixed-content.
- EXPECT_TRUE(tab->ClickSSLInfoBarLink(0, true));
-
- // The image should show now.
- EXPECT_TRUE(tab->ExecuteAndExtractInt(L"",
- L"window.domAutomationController.send(ImageWidth());",
- &img_width));
- EXPECT_LT(100, img_width);
-
- // And our status should be mixed-content.
- EXPECT_TRUE(tab->GetSecurityState(&security_style, &cert_status,
- &mixed_content_state));
- EXPECT_EQ(SECURITY_STYLE_AUTHENTICATED, security_style);
- EXPECT_EQ(0, cert_status & net::CERT_STATUS_ALL_ERRORS);
- EXPECT_EQ(NavigationEntry::SSLStatus::MIXED_CONTENT, mixed_content_state);
-}
-
// Visits a page with an http script that tries to suppress our mixed content
// warnings by randomize location.hash.
// Based on http://crbug.com/8706