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

Side by Side Diff: net/http/transport_security_state_unittest.cc

Issue 23606005: Add wallet to the Google HSTS list (replacing defunct health). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « net/http/transport_security_state_static.json ('k') | 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "net/http/transport_security_state.h" 5 #include "net/http/transport_security_state.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 EXPECT_FALSE(domain_state.pkp_include_subdomains); 233 EXPECT_FALSE(domain_state.pkp_include_subdomains);
234 234
235 EXPECT_TRUE(HasState("paypal.com")); 235 EXPECT_TRUE(HasState("paypal.com"));
236 EXPECT_FALSE(HasState("www2.paypal.com")); 236 EXPECT_FALSE(HasState("www2.paypal.com"));
237 EXPECT_FALSE(HasState("www2.paypal.com")); 237 EXPECT_FALSE(HasState("www2.paypal.com"));
238 238
239 // Google hosts: 239 // Google hosts:
240 240
241 EXPECT_TRUE(ShouldRedirect("chrome.google.com")); 241 EXPECT_TRUE(ShouldRedirect("chrome.google.com"));
242 EXPECT_TRUE(ShouldRedirect("checkout.google.com")); 242 EXPECT_TRUE(ShouldRedirect("checkout.google.com"));
243 EXPECT_TRUE(ShouldRedirect("health.google.com")); 243 EXPECT_TRUE(ShouldRedirect("wallet.google.com"));
244 EXPECT_TRUE(ShouldRedirect("docs.google.com")); 244 EXPECT_TRUE(ShouldRedirect("docs.google.com"));
245 EXPECT_TRUE(ShouldRedirect("sites.google.com")); 245 EXPECT_TRUE(ShouldRedirect("sites.google.com"));
246 EXPECT_TRUE(ShouldRedirect("drive.google.com")); 246 EXPECT_TRUE(ShouldRedirect("drive.google.com"));
247 EXPECT_TRUE(ShouldRedirect("spreadsheets.google.com")); 247 EXPECT_TRUE(ShouldRedirect("spreadsheets.google.com"));
248 EXPECT_TRUE(ShouldRedirect("appengine.google.com")); 248 EXPECT_TRUE(ShouldRedirect("appengine.google.com"));
249 EXPECT_TRUE(ShouldRedirect("market.android.com")); 249 EXPECT_TRUE(ShouldRedirect("market.android.com"));
250 EXPECT_TRUE(ShouldRedirect("encrypted.google.com")); 250 EXPECT_TRUE(ShouldRedirect("encrypted.google.com"));
251 EXPECT_TRUE(ShouldRedirect("accounts.google.com")); 251 EXPECT_TRUE(ShouldRedirect("accounts.google.com"));
252 EXPECT_TRUE(ShouldRedirect("profiles.google.com")); 252 EXPECT_TRUE(ShouldRedirect("profiles.google.com"));
253 EXPECT_TRUE(ShouldRedirect("mail.google.com")); 253 EXPECT_TRUE(ShouldRedirect("mail.google.com"));
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
482 HashValueVector hashes; 482 HashValueVector hashes;
483 // Checks that a built-in list does exist. 483 // Checks that a built-in list does exist.
484 EXPECT_FALSE(domain_state.CheckPublicKeyPins(hashes)); 484 EXPECT_FALSE(domain_state.CheckPublicKeyPins(hashes));
485 EXPECT_FALSE(HasPublicKeyPins("www.paypal.com")); 485 EXPECT_FALSE(HasPublicKeyPins("www.paypal.com"));
486 486
487 EXPECT_TRUE(HasPublicKeyPins("docs.google.com")); 487 EXPECT_TRUE(HasPublicKeyPins("docs.google.com"));
488 EXPECT_TRUE(HasPublicKeyPins("1.docs.google.com")); 488 EXPECT_TRUE(HasPublicKeyPins("1.docs.google.com"));
489 EXPECT_TRUE(HasPublicKeyPins("sites.google.com")); 489 EXPECT_TRUE(HasPublicKeyPins("sites.google.com"));
490 EXPECT_TRUE(HasPublicKeyPins("drive.google.com")); 490 EXPECT_TRUE(HasPublicKeyPins("drive.google.com"));
491 EXPECT_TRUE(HasPublicKeyPins("spreadsheets.google.com")); 491 EXPECT_TRUE(HasPublicKeyPins("spreadsheets.google.com"));
492 EXPECT_TRUE(HasPublicKeyPins("health.google.com")); 492 EXPECT_TRUE(HasPublicKeyPins("wallet.google.com"));
493 EXPECT_TRUE(HasPublicKeyPins("checkout.google.com")); 493 EXPECT_TRUE(HasPublicKeyPins("checkout.google.com"));
494 EXPECT_TRUE(HasPublicKeyPins("appengine.google.com")); 494 EXPECT_TRUE(HasPublicKeyPins("appengine.google.com"));
495 EXPECT_TRUE(HasPublicKeyPins("market.android.com")); 495 EXPECT_TRUE(HasPublicKeyPins("market.android.com"));
496 EXPECT_TRUE(HasPublicKeyPins("encrypted.google.com")); 496 EXPECT_TRUE(HasPublicKeyPins("encrypted.google.com"));
497 EXPECT_TRUE(HasPublicKeyPins("accounts.google.com")); 497 EXPECT_TRUE(HasPublicKeyPins("accounts.google.com"));
498 EXPECT_TRUE(HasPublicKeyPins("profiles.google.com")); 498 EXPECT_TRUE(HasPublicKeyPins("profiles.google.com"));
499 EXPECT_TRUE(HasPublicKeyPins("mail.google.com")); 499 EXPECT_TRUE(HasPublicKeyPins("mail.google.com"));
500 EXPECT_TRUE(HasPublicKeyPins("chatenabled.mail.google.com")); 500 EXPECT_TRUE(HasPublicKeyPins("chatenabled.mail.google.com"));
501 EXPECT_TRUE(HasPublicKeyPins("talkgadget.google.com")); 501 EXPECT_TRUE(HasPublicKeyPins("talkgadget.google.com"));
502 EXPECT_TRUE(HasPublicKeyPins("hostedtalkgadget.google.com")); 502 EXPECT_TRUE(HasPublicKeyPins("hostedtalkgadget.google.com"));
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 // Expect to fail for SNI hosts when not searching the SNI list: 833 // Expect to fail for SNI hosts when not searching the SNI list:
834 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( 834 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty(
835 "gmail.com", false)); 835 "gmail.com", false));
836 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( 836 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty(
837 "googlegroups.com", false)); 837 "googlegroups.com", false));
838 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( 838 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty(
839 "www.googlegroups.com", false)); 839 "www.googlegroups.com", false));
840 } 840 }
841 841
842 } // namespace net 842 } // namespace net
OLDNEW
« no previous file with comments | « net/http/transport_security_state_static.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698