| 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/base_switches.h" | 7 #include "base/base_switches.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 1698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1709 https_server_expired_.host_port_pair(), &replacement_path); | 1709 https_server_expired_.host_port_pair(), &replacement_path); |
| 1710 ui_test_utils::NavigateToURL(browser(), | 1710 ui_test_utils::NavigateToURL(browser(), |
| 1711 https_server_.GetURL(replacement_path)); | 1711 https_server_.GetURL(replacement_path)); |
| 1712 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); | 1712 WebContents* tab = browser()->tab_strip_model()->GetActiveWebContents(); |
| 1713 // When the bad content is filtered, the state is expected to be | 1713 // When the bad content is filtered, the state is expected to be |
| 1714 // authenticated. | 1714 // authenticated. |
| 1715 CheckAuthenticatedState(tab, AuthState::NONE); | 1715 CheckAuthenticatedState(tab, AuthState::NONE); |
| 1716 // The iframe attempts to open a popup window, but it shouldn't be able to. | 1716 // The iframe attempts to open a popup window, but it shouldn't be able to. |
| 1717 // Previous popup is still open. | 1717 // Previous popup is still open. |
| 1718 EXPECT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); | 1718 EXPECT_EQ(2u, chrome::GetBrowserCount(browser()->profile())); |
| 1719 // Assume the broken image width is less than 100. | 1719 // The broken image width is zero. |
| 1720 int img_width = 0; | 1720 int img_width = 99; |
| 1721 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( | 1721 EXPECT_TRUE(content::ExecuteScriptAndExtractInt( |
| 1722 tab, "window.domAutomationController.send(ImageWidth());", &img_width)); | 1722 tab, "window.domAutomationController.send(ImageWidth());", &img_width)); |
| 1723 EXPECT_GT(img_width, 0); | 1723 EXPECT_EQ(img_width, 0); |
| 1724 EXPECT_LT(img_width, 100); | |
| 1725 // Check that variable |foo| is not set. | 1724 // Check that variable |foo| is not set. |
| 1726 bool js_result = false; | 1725 bool js_result = false; |
| 1727 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( | 1726 EXPECT_TRUE(content::ExecuteScriptAndExtractBool( |
| 1728 tab, "window.domAutomationController.send(IsFooSet());", &js_result)); | 1727 tab, "window.domAutomationController.send(IsFooSet());", &js_result)); |
| 1729 EXPECT_FALSE(js_result); | 1728 EXPECT_FALSE(js_result); |
| 1730 } | 1729 } |
| 1731 } | 1730 } |
| 1732 | 1731 |
| 1733 // Visits a page with insecure content loaded by JS (after the initial page | 1732 // Visits a page with insecure content loaded by JS (after the initial page |
| 1734 // load). | 1733 // load). |
| (...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4449 | 4448 |
| 4450 // Visit a page over https that contains a frame with a redirect. | 4449 // Visit a page over https that contains a frame with a redirect. |
| 4451 | 4450 |
| 4452 // XMLHttpRequest insecure content in synchronous mode. | 4451 // XMLHttpRequest insecure content in synchronous mode. |
| 4453 | 4452 |
| 4454 // XMLHttpRequest insecure content in asynchronous mode. | 4453 // XMLHttpRequest insecure content in asynchronous mode. |
| 4455 | 4454 |
| 4456 // XMLHttpRequest over bad ssl in synchronous mode. | 4455 // XMLHttpRequest over bad ssl in synchronous mode. |
| 4457 | 4456 |
| 4458 // XMLHttpRequest over OK ssl in synchronous mode. | 4457 // XMLHttpRequest over OK ssl in synchronous mode. |
| OLD | NEW |