| OLD | NEW |
| 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/base/transport_security_state.h" | 5 #include "net/base/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 427 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 EXPECT_TRUE(ShouldRedirect("developer.mydigipass.com")); | 438 EXPECT_TRUE(ShouldRedirect("developer.mydigipass.com")); |
| 439 EXPECT_FALSE(ShouldRedirect("foo.developer.mydigipass.com")); | 439 EXPECT_FALSE(ShouldRedirect("foo.developer.mydigipass.com")); |
| 440 EXPECT_TRUE(ShouldRedirect("www.developer.mydigipass.com")); | 440 EXPECT_TRUE(ShouldRedirect("www.developer.mydigipass.com")); |
| 441 EXPECT_FALSE(ShouldRedirect("foo.www.developer.mydigipass.com")); | 441 EXPECT_FALSE(ShouldRedirect("foo.www.developer.mydigipass.com")); |
| 442 EXPECT_TRUE(ShouldRedirect("sandbox.mydigipass.com")); | 442 EXPECT_TRUE(ShouldRedirect("sandbox.mydigipass.com")); |
| 443 EXPECT_FALSE(ShouldRedirect("foo.sandbox.mydigipass.com")); | 443 EXPECT_FALSE(ShouldRedirect("foo.sandbox.mydigipass.com")); |
| 444 EXPECT_TRUE(ShouldRedirect("www.sandbox.mydigipass.com")); | 444 EXPECT_TRUE(ShouldRedirect("www.sandbox.mydigipass.com")); |
| 445 EXPECT_FALSE(ShouldRedirect("foo.www.sandbox.mydigipass.com")); | 445 EXPECT_FALSE(ShouldRedirect("foo.www.sandbox.mydigipass.com")); |
| 446 | 446 |
| 447 EXPECT_TRUE(ShouldRedirect("crypto.cat")); | 447 EXPECT_TRUE(ShouldRedirect("crypto.cat")); |
| 448 EXPECT_TRUE(ShouldRedirect("foo.crypto.cat")); | 448 EXPECT_FALSE(ShouldRedirect("foo.crypto.cat")); |
| 449 | 449 |
| 450 EXPECT_TRUE(ShouldRedirect("bigshinylock.minazo.net")); | 450 EXPECT_TRUE(ShouldRedirect("bigshinylock.minazo.net")); |
| 451 EXPECT_TRUE(ShouldRedirect("foo.bigshinylock.minazo.net")); | 451 EXPECT_TRUE(ShouldRedirect("foo.bigshinylock.minazo.net")); |
| 452 | 452 |
| 453 EXPECT_TRUE(ShouldRedirect("crate.io")); | 453 EXPECT_TRUE(ShouldRedirect("crate.io")); |
| 454 EXPECT_TRUE(ShouldRedirect("foo.crate.io")); | 454 EXPECT_TRUE(ShouldRedirect("foo.crate.io")); |
| 455 | 455 |
| 456 EXPECT_TRUE(HasPins("www.twitter.com")); | 456 EXPECT_TRUE(HasPins("www.twitter.com")); |
| 457 } | 457 } |
| 458 | 458 |
| (...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 827 // Expect to fail for SNI hosts when not searching the SNI list: | 827 // Expect to fail for SNI hosts when not searching the SNI list: |
| 828 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( | 828 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( |
| 829 "gmail.com", false)); | 829 "gmail.com", false)); |
| 830 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( | 830 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( |
| 831 "googlegroups.com", false)); | 831 "googlegroups.com", false)); |
| 832 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( | 832 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( |
| 833 "www.googlegroups.com", false)); | 833 "www.googlegroups.com", false)); |
| 834 } | 834 } |
| 835 | 835 |
| 836 } // namespace net | 836 } // namespace net |
| OLD | NEW |