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

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

Issue 1223233002: Common Name Mismatch Handler For WWW Subdomain Mismatch case (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changing function signature in unnittest file Created 5 years, 5 months 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ssl_error_handler.h" 5 #include "chrome/browser/ssl/ssl_error_handler.h"
6 6
7 #include "base/callback.h" 7 #include "base/callback.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/metrics/field_trial.h" 9 #include "base/metrics/field_trial.h"
10 #include "base/run_loop.h" 10 #include "base/run_loop.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 captive_portal_checked_ = false; 72 captive_portal_checked_ = false;
73 ssl_interstitial_shown_ = false; 73 ssl_interstitial_shown_ = false;
74 captive_portal_interstitial_shown_ = false; 74 captive_portal_interstitial_shown_ = false;
75 } 75 }
76 76
77 private: 77 private:
78 void CheckForCaptivePortal() override { 78 void CheckForCaptivePortal() override {
79 captive_portal_checked_ = true; 79 captive_portal_checked_ = true;
80 } 80 }
81 81
82 void ShowSSLInterstitial() override { 82 void ShowSSLInterstitial(GURL& suggested_url) override {
meacer 2015/07/09 17:58:56 const
83 ssl_interstitial_shown_ = true; 83 ssl_interstitial_shown_ = true;
84 } 84 }
85 85
86 void ShowCaptivePortalInterstitial(const GURL& landing_url) override { 86 void ShowCaptivePortalInterstitial(const GURL& landing_url) override {
87 captive_portal_interstitial_shown_ = true; 87 captive_portal_interstitial_shown_ = true;
88 } 88 }
89 89
90 Profile* profile_; 90 Profile* profile_;
91 bool captive_portal_checked_; 91 bool captive_portal_checked_;
92 bool ssl_interstitial_shown_; 92 bool ssl_interstitial_shown_;
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 ShouldShowSSLInterstitialOnCaptivePortalDetectionDisabled) { 197 ShouldShowSSLInterstitialOnCaptivePortalDetectionDisabled) {
198 EXPECT_FALSE(error_handler()->IsTimerRunning()); 198 EXPECT_FALSE(error_handler()->IsTimerRunning());
199 error_handler()->StartHandlingError(); 199 error_handler()->StartHandlingError();
200 EXPECT_FALSE(error_handler()->IsTimerRunning()); 200 EXPECT_FALSE(error_handler()->IsTimerRunning());
201 EXPECT_FALSE(error_handler()->captive_portal_checked()); 201 EXPECT_FALSE(error_handler()->captive_portal_checked());
202 EXPECT_TRUE(error_handler()->ssl_interstitial_shown()); 202 EXPECT_TRUE(error_handler()->ssl_interstitial_shown());
203 EXPECT_FALSE(error_handler()->captive_portal_interstitial_shown()); 203 EXPECT_FALSE(error_handler()->captive_portal_interstitial_shown());
204 } 204 }
205 205
206 #endif // defined(ENABLE_CAPTIVE_PORTAL_DETECTION) 206 #endif // defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698