Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: chrome/browser/ssl/chrome_security_state_model_client_browser_tests.cc

Issue 2471623007: Disable PasswordSecurityLevelDowngradedFromHttpsIframe on Linux. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "chrome/browser/ssl/chrome_security_state_model_client.h" 5 #include "chrome/browser/ssl/chrome_security_state_model_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/strings/string_split.h" 10 #include "base/strings/string_split.h"
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 content::NavigationEntry* entry = contents->GetController().GetVisibleEntry(); 1017 content::NavigationEntry* entry = contents->GetController().GetVisibleEntry();
1018 ASSERT_TRUE(entry); 1018 ASSERT_TRUE(entry);
1019 EXPECT_TRUE(entry->GetSSL().content_status & 1019 EXPECT_TRUE(entry->GetSSL().content_status &
1020 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP); 1020 content::SSLStatus::DISPLAYED_PASSWORD_FIELD_ON_HTTP);
1021 } 1021 }
1022 1022
1023 // Tests that when a visible password field is detected inside an iframe 1023 // Tests that when a visible password field is detected inside an iframe
1024 // on an HTTP page load, and when the command-line flag is set, the 1024 // on an HTTP page load, and when the command-line flag is set, the
1025 // security level is downgraded to HTTP_SHOW_WARNING, even if the iframe 1025 // security level is downgraded to HTTP_SHOW_WARNING, even if the iframe
1026 // itself was loaded over HTTPS. 1026 // itself was loaded over HTTPS.
1027 #if defined(OS_LINUX)
1028 // Flaky on Linux. See https://crbug.com/662485.
1029 #define MAYBE_PasswordSecurityLevelDowngradedFromHttpsIframe \
1030 DISABLED_PasswordSecurityLevelDowngradedFromHttpsIframe
1031 #else
1032 #define MAYBE_PasswordSecurityLevelDowngradedFromHttpsIframe \
1033 PasswordSecurityLevelDowngradedFromHttpsIframe
1034 #endif
1027 IN_PROC_BROWSER_TEST_F(ChromeSecurityStateModelClientTestWithPasswordCcSwitch, 1035 IN_PROC_BROWSER_TEST_F(ChromeSecurityStateModelClientTestWithPasswordCcSwitch,
1028 PasswordSecurityLevelDowngradedFromHttpsIframe) { 1036 MAYBE_PasswordSecurityLevelDowngradedFromHttpsIframe) {
1029 content::WebContents* contents = 1037 content::WebContents* contents =
1030 browser()->tab_strip_model()->GetActiveWebContents(); 1038 browser()->tab_strip_model()->GetActiveWebContents();
1031 ASSERT_TRUE(contents); 1039 ASSERT_TRUE(contents);
1032 1040
1033 ChromeSecurityStateModelClient* model_client = 1041 ChromeSecurityStateModelClient* model_client =
1034 ChromeSecurityStateModelClient::FromWebContents(contents); 1042 ChromeSecurityStateModelClient::FromWebContents(contents);
1035 ASSERT_TRUE(model_client); 1043 ASSERT_TRUE(model_client);
1036 1044
1037 // Navigate to an HTTP URL, which loads an iframe using the host and port of 1045 // Navigate to an HTTP URL, which loads an iframe using the host and port of
1038 // |https_server_|. 1046 // |https_server_|.
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 ChromeSecurityStateModelClient* model_client = 2049 ChromeSecurityStateModelClient* model_client =
2042 ChromeSecurityStateModelClient::FromWebContents(web_contents); 2050 ChromeSecurityStateModelClient::FromWebContents(web_contents);
2043 ASSERT_TRUE(model_client); 2051 ASSERT_TRUE(model_client);
2044 SecurityStateModel::SecurityInfo security_info; 2052 SecurityStateModel::SecurityInfo security_info;
2045 model_client->GetSecurityInfo(&security_info); 2053 model_client->GetSecurityInfo(&security_info);
2046 EXPECT_EQ(SecurityStateModel::SECURE, security_info.security_level); 2054 EXPECT_EQ(SecurityStateModel::SECURE, security_info.security_level);
2047 EXPECT_EQ(kTestSCTStatuses, security_info.sct_verify_statuses); 2055 EXPECT_EQ(kTestSCTStatuses, security_info.sct_verify_statuses);
2048 } 2056 }
2049 2057
2050 } // namespace 2058 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698