summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 20:19:48 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-16 20:19:48 +0000
commitbba89d313476af018a1fcc7774262c9b65d9e9fc (patch)
tree2bd4999eaa6981819fdfd8e420d38da0af492a57 /chrome
parent8dd4ed44f21837265f6d54217069d5babb57e048 (diff)
downloadchromium_src-bba89d313476af018a1fcc7774262c9b65d9e9fc.zip
chromium_src-bba89d313476af018a1fcc7774262c9b65d9e9fc.tar.gz
chromium_src-bba89d313476af018a1fcc7774262c9b65d9e9fc.tar.bz2
When a mixed-content resource was loaded, we would apply the mixed-content state to the active entry, which would be the pending entry if there is one.
That caused a problem in cases where a bad resource is loading and we are initiating a navigation from the browser (and therefore creating a pending entry). More details: In the GoodFrame test, the top-frame is HTTPS and we load an HTTP frame with an image. As soon as the bad frame has loaded, we navigate back (creating a pending entry). In rare cases, the notification for the mixed-content image of the HTTP frame would happen after the back action, mistakingly setting the mixed-content state on the pending entry. BUG=2742 TEST=Run the SSL UI tests 1000 times. Review URL: http://codereview.chromium.org/7440 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3480 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/ssl_policy.cc3
-rw-r--r--chrome/browser/ssl_uitest.cc6
2 files changed, 4 insertions, 5 deletions
diff --git a/chrome/browser/ssl_policy.cc b/chrome/browser/ssl_policy.cc
index a93b31d..099f5c0 100644
--- a/chrome/browser/ssl_policy.cc
+++ b/chrome/browser/ssl_policy.cc
@@ -317,7 +317,8 @@ class DefaultPolicy : public SSLPolicy {
}
mixed_content_handler->StartRequest(filter_policy);
- NavigationEntry* entry = navigation_controller->GetActiveEntry();
+ NavigationEntry* entry = navigation_controller->GetLastCommittedEntry();
+ DCHECK(entry);
// Even though we are loading the mixed-content resource, it will not be
// included in the page when we set the policy to FILTER_ALL or
// FILTER_ALL_EXCEPT_IMAGES (only images and they are stamped with warning
diff --git a/chrome/browser/ssl_uitest.cc b/chrome/browser/ssl_uitest.cc
index 989fdbb..4446a02 100644
--- a/chrome/browser/ssl_uitest.cc
+++ b/chrome/browser/ssl_uitest.cc
@@ -202,8 +202,7 @@ TEST_F(SSLUITest, TestHTTPSExpiredCert) {
//
// Visits a page with mixed content.
-// Diasbled for flackiness (bug #2742).
-TEST_F(SSLUITest, DISABLED_TestMixedContents) {
+TEST_F(SSLUITest, TestMixedContents) {
HTTPSTestServer https_server(kHostName, kOKHTTPSPort,
kDocRoot, GetOKCertPath());
TestServer http_server(kDocRoot);
@@ -717,8 +716,7 @@ TEST_F(SSLUITest, TestConnectToBadPort) {
// - navigate to a bad HTTPS (expect unsafe content and filtered frame), then
// back
// - navigate to HTTP (expect mixed content), then back
-// Disabled for flackiness (bug #2742).
-TEST_F(SSLUITest, DISABLED_TestGoodFrameNavigation) {
+TEST_F(SSLUITest, TestGoodFrameNavigation) {
TestServer http_server(kDocRoot);
HTTPSTestServer good_https_server(kHostName, kOKHTTPSPort,
kDocRoot, GetOKCertPath());