| Index: chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
|
| diff --git a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
|
| index f83ffeff9df0a7ae10af0a2cc585672616b600ea..601be4958d0028844c1127de57cffc914ae83b6d 100644
|
| --- a/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
|
| +++ b/chrome/browser/ssl/security_state_tab_helper_browser_tests.cc
|
| @@ -733,6 +733,28 @@ IN_PROC_BROWSER_TEST_F(SecurityStateTabHelperTest, BrokenHTTPS) {
|
| true /* expect cert status error */);
|
| }
|
|
|
| +// Tests that the security level of data: URLs is always downgraded to
|
| +// HTTP_SHOW_WARNING.
|
| +IN_PROC_BROWSER_TEST_F(SecurityStateTabHelperTest,
|
| + SecurityLevelDowngradedOnDataUrl) {
|
| + content::WebContents* contents =
|
| + browser()->tab_strip_model()->GetActiveWebContents();
|
| + ASSERT_TRUE(contents);
|
| +
|
| + SecurityStateTabHelper* helper =
|
| + SecurityStateTabHelper::FromWebContents(contents);
|
| + ASSERT_TRUE(helper);
|
| +
|
| + ui_test_utils::NavigateToURL(browser(), GURL("data:text/html,<html></html>"));
|
| + security_state::SecurityInfo security_info;
|
| + helper->GetSecurityInfo(&security_info);
|
| + EXPECT_EQ(security_state::HTTP_SHOW_WARNING, security_info.security_level);
|
| +
|
| + content::NavigationEntry* entry = contents->GetController().GetVisibleEntry();
|
| + ASSERT_TRUE(entry);
|
| + EXPECT_EQ(content::SSLStatus::NORMAL_CONTENT, entry->GetSSL().content_status);
|
| +}
|
| +
|
| const char kReportURI[] = "https://report-hpkp.test";
|
|
|
| class PKPModelClientTest : public SecurityStateTabHelperTest {
|
|
|