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

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

Issue 839143002: Roll Chrome into Mojo. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rebase Created 5 years, 11 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 (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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 EXPECT_FALSE(StaticShouldRedirect("foo.www.mydigipass.com")); 469 EXPECT_FALSE(StaticShouldRedirect("foo.www.mydigipass.com"));
470 EXPECT_TRUE(StaticShouldRedirect("developer.mydigipass.com")); 470 EXPECT_TRUE(StaticShouldRedirect("developer.mydigipass.com"));
471 EXPECT_FALSE(StaticShouldRedirect("foo.developer.mydigipass.com")); 471 EXPECT_FALSE(StaticShouldRedirect("foo.developer.mydigipass.com"));
472 EXPECT_TRUE(StaticShouldRedirect("www.developer.mydigipass.com")); 472 EXPECT_TRUE(StaticShouldRedirect("www.developer.mydigipass.com"));
473 EXPECT_FALSE(StaticShouldRedirect("foo.www.developer.mydigipass.com")); 473 EXPECT_FALSE(StaticShouldRedirect("foo.www.developer.mydigipass.com"));
474 EXPECT_TRUE(StaticShouldRedirect("sandbox.mydigipass.com")); 474 EXPECT_TRUE(StaticShouldRedirect("sandbox.mydigipass.com"));
475 EXPECT_FALSE(StaticShouldRedirect("foo.sandbox.mydigipass.com")); 475 EXPECT_FALSE(StaticShouldRedirect("foo.sandbox.mydigipass.com"));
476 EXPECT_TRUE(StaticShouldRedirect("www.sandbox.mydigipass.com")); 476 EXPECT_TRUE(StaticShouldRedirect("www.sandbox.mydigipass.com"));
477 EXPECT_FALSE(StaticShouldRedirect("foo.www.sandbox.mydigipass.com")); 477 EXPECT_FALSE(StaticShouldRedirect("foo.www.sandbox.mydigipass.com"));
478 478
479 EXPECT_TRUE(StaticShouldRedirect("crypto.cat"));
480 EXPECT_FALSE(StaticShouldRedirect("foo.crypto.cat"));
481
482 EXPECT_TRUE(StaticShouldRedirect("bigshinylock.minazo.net")); 479 EXPECT_TRUE(StaticShouldRedirect("bigshinylock.minazo.net"));
483 EXPECT_TRUE(StaticShouldRedirect("foo.bigshinylock.minazo.net")); 480 EXPECT_TRUE(StaticShouldRedirect("foo.bigshinylock.minazo.net"));
484 481
485 EXPECT_TRUE(StaticShouldRedirect("crate.io")); 482 EXPECT_TRUE(StaticShouldRedirect("crate.io"));
486 EXPECT_TRUE(StaticShouldRedirect("foo.crate.io")); 483 EXPECT_TRUE(StaticShouldRedirect("foo.crate.io"));
487 } 484 }
488 485
489 TEST_F(TransportSecurityStateTest, PreloadedPins) { 486 TEST_F(TransportSecurityStateTest, PreloadedPins) {
490 TransportSecurityState state; 487 TransportSecurityState state;
491 EnableStaticPins(&state); 488 EnableStaticPins(&state);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
766 // These hosts used to only be HSTS when SNI was available. 763 // These hosts used to only be HSTS when SNI was available.
767 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( 764 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty(
768 "gmail.com")); 765 "gmail.com"));
769 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( 766 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty(
770 "googlegroups.com")); 767 "googlegroups.com"));
771 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty( 768 EXPECT_TRUE(TransportSecurityState::IsGooglePinnedProperty(
772 "www.googlegroups.com")); 769 "www.googlegroups.com"));
773 } 770 }
774 771
775 } // namespace net 772 } // namespace net
OLDNEW
« no previous file with comments | « net/http/transport_security_state_static.json ('k') | net/quic/congestion_control/pacing_sender.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698