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

Unified Diff: chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc

Issue 2448943002: Refactor SecurityStateModel/Clients for simplicity and reusability. (Closed)
Patch Set: sync. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
diff --git a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
index c6f5277f5a60581012f5ac317f2ce18f7b826a3b..33c72526ea99e48e8160e11e71e64c216dd21591 100644
--- a/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
+++ b/chrome/browser/ssl/captive_portal_blocking_page_browsertest.cc
@@ -16,7 +16,7 @@
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ssl/cert_report_helper.h"
#include "chrome/browser/ssl/certificate_reporting_test_utils.h"
-#include "chrome/browser/ssl/chrome_security_state_model_client.h"
+#include "chrome/browser/ssl/security_state_tab_helper.h"
#include "chrome/browser/ssl/ssl_cert_reporter.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
@@ -24,6 +24,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "components/captive_portal/captive_portal_detector.h"
#include "components/prefs/pref_service.h"
+#include "components/security_state/core/security_state.h"
#include "content/public/browser/interstitial_page.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/browser_test_utils.h"
@@ -168,13 +169,12 @@ void CaptivePortalBlockingPageTest::TestInterstitial(
kGenericLoginURLText));
// Check that a red/dangerous lock icon is showing on the interstitial.
- ChromeSecurityStateModelClient* security_model =
- ChromeSecurityStateModelClient::FromWebContents(contents);
- ASSERT_TRUE(security_model);
- security_state::SecurityStateModel::SecurityInfo security_info;
- security_model->GetSecurityInfo(&security_info);
- EXPECT_EQ(security_state::SecurityStateModel::DANGEROUS,
- security_info.security_level);
+ SecurityStateTabHelper* helper =
+ SecurityStateTabHelper::FromWebContents(contents);
+ ASSERT_TRUE(helper);
+ security_state::SecurityInfo security_info;
+ helper->GetSecurityInfo(&security_info);
+ EXPECT_EQ(security_state::DANGEROUS, security_info.security_level);
}
void CaptivePortalBlockingPageTest::TestInterstitial(

Powered by Google App Engine
This is Rietveld 408576698