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

Side by Side Diff: ios/web/net/request_tracker_impl_unittest.mm

Issue 1136643004: Switch remaining functions from SchemeIsSecure() to SchemeIsCryptographic(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing. Created 5 years, 7 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
« no previous file with comments | « ios/web/net/request_tracker_impl.mm ('k') | remoting/host/third_party_auth_config.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ios/web/net/request_tracker_impl.h" 5 #include "ios/web/net/request_tracker_impl.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/mac/scoped_nsobject.h" 8 #include "base/mac/scoped_nsobject.h"
9 #include "base/memory/scoped_vector.h" 9 #include "base/memory/scoped_vector.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 response->ssl_info.cert = new net::X509Certificate( 251 response->ssl_info.cert = new net::X509Certificate(
252 "subject", "issuer", 252 "subject", "issuer",
253 base::Time::Now() - base::TimeDelta::FromDays(2), 253 base::Time::Now() - base::TimeDelta::FromDays(2),
254 base::Time::Now() + base::TimeDelta::FromDays(2)); 254 base::Time::Now() + base::TimeDelta::FromDays(2));
255 response->ssl_info.cert_status = 0; // No errors. 255 response->ssl_info.cert_status = 0; // No errors.
256 response->ssl_info.security_bits = 128; 256 response->ssl_info.security_bits = 128;
257 257
258 EXPECT_TRUE(requests_[i]->ssl_info().is_valid()); 258 EXPECT_TRUE(requests_[i]->ssl_info().is_valid());
259 } 259 }
260 } 260 }
261 EXPECT_TRUE(!secure == !requests_[i]->url().SchemeIsSecure()); 261 EXPECT_TRUE(!secure == !requests_[i]->url().SchemeIsCryptographic());
262 return requests_[i]; 262 return requests_[i];
263 } 263 }
264 264
265 DISALLOW_COPY_AND_ASSIGN(RequestTrackerTest); 265 DISALLOW_COPY_AND_ASSIGN(RequestTrackerTest);
266 }; 266 };
267 267
268 TEST_F(RequestTrackerTest, OnePage) { 268 TEST_F(RequestTrackerTest, OnePage) {
269 // Start a request. 269 // Start a request.
270 tracker_->StartRequest(GetRequest(0)); 270 tracker_->StartRequest(GetRequest(0));
271 // Start page load. 271 // Start page load.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 base::Bind(&TwoStartsSSLCallback, 489 base::Bind(&TwoStartsSSLCallback,
490 &request_0_called)); 490 &request_0_called));
491 tracker_->OnSSLCertificateError(GetSecureRequest(1), ssl_info, true, 491 tracker_->OnSSLCertificateError(GetSecureRequest(1), ssl_info, true,
492 base::Bind(&TwoStartsSSLCallback, 492 base::Bind(&TwoStartsSSLCallback,
493 &request_1_called)); 493 &request_1_called));
494 EXPECT_TRUE(request_0_called); 494 EXPECT_TRUE(request_0_called);
495 EXPECT_TRUE(request_1_called); 495 EXPECT_TRUE(request_1_called);
496 } 496 }
497 497
498 } // namespace 498 } // namespace
OLDNEW
« no previous file with comments | « ios/web/net/request_tracker_impl.mm ('k') | remoting/host/third_party_auth_config.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698