OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <utility> | 5 #include <utility> |
6 | 6 |
7 #include "base/base64.h" | 7 #include "base/base64.h" |
8 #include "base/base_switches.h" | 8 #include "base/base_switches.h" |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/bind_helpers.h" | 10 #include "base/bind_helpers.h" |
(...skipping 2390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2401 // Load the image. It starts at |https_server_|, which redirects to an | 2401 // Load the image. It starts at |https_server_|, which redirects to an |
2402 // embedded_test_server() HTTP URL, which redirects back to | 2402 // embedded_test_server() HTTP URL, which redirects back to |
2403 // |https_server_| for the final HTTPS image. Because the redirect | 2403 // |https_server_| for the final HTTPS image. Because the redirect |
2404 // chain passes through HTTP, the page should be marked as mixed | 2404 // chain passes through HTTP, the page should be marked as mixed |
2405 // content. | 2405 // content. |
2406 set_expected_notification("\"mixed-image-loaded\""); | 2406 set_expected_notification("\"mixed-image-loaded\""); |
2407 set_run_loop(&run_loop); | 2407 set_run_loop(&run_loop); |
2408 ASSERT_TRUE(content::ExecuteScript( | 2408 ASSERT_TRUE(content::ExecuteScript( |
2409 tab, | 2409 tab, |
2410 "var loaded = function () {" | 2410 "var loaded = function () {" |
2411 " window.domAutomationController.setAutomationId(0);" | |
2412 " window.domAutomationController.send('mixed-image-loaded');" | 2411 " window.domAutomationController.send('mixed-image-loaded');" |
2413 "};" | 2412 "};" |
2414 "var img = document.createElement('img');" | 2413 "var img = document.createElement('img');" |
2415 "img.onload = loaded;" | 2414 "img.onload = loaded;" |
2416 "img.src = '" + | 2415 "img.src = '" + |
2417 https_url.spec() + "';" | 2416 https_url.spec() + "';" |
2418 "document.body.appendChild(img);")); | 2417 "document.body.appendChild(img);")); |
2419 | 2418 |
2420 run_loop.Run(); | 2419 run_loop.Run(); |
2421 CheckSecurityState(tab, CertError::NONE, security_state::NONE, | 2420 CheckSecurityState(tab, CertError::NONE, security_state::NONE, |
(...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5114 | 5113 |
5115 // Visit a page over https that contains a frame with a redirect. | 5114 // Visit a page over https that contains a frame with a redirect. |
5116 | 5115 |
5117 // XMLHttpRequest insecure content in synchronous mode. | 5116 // XMLHttpRequest insecure content in synchronous mode. |
5118 | 5117 |
5119 // XMLHttpRequest insecure content in asynchronous mode. | 5118 // XMLHttpRequest insecure content in asynchronous mode. |
5120 | 5119 |
5121 // XMLHttpRequest over bad ssl in synchronous mode. | 5120 // XMLHttpRequest over bad ssl in synchronous mode. |
5122 | 5121 |
5123 // XMLHttpRequest over OK ssl in synchronous mode. | 5122 // XMLHttpRequest over OK ssl in synchronous mode. |
OLD | NEW |