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 | 9 |
10 #include "base/base64.h" | 10 #include "base/base64.h" |
(...skipping 799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
810 EXPECT_TRUE(ShouldRedirect("www.developer.mydigipass.com")); | 810 EXPECT_TRUE(ShouldRedirect("www.developer.mydigipass.com")); |
811 EXPECT_FALSE(ShouldRedirect("foo.www.developer.mydigipass.com")); | 811 EXPECT_FALSE(ShouldRedirect("foo.www.developer.mydigipass.com")); |
812 EXPECT_TRUE(ShouldRedirect("sandbox.mydigipass.com")); | 812 EXPECT_TRUE(ShouldRedirect("sandbox.mydigipass.com")); |
813 EXPECT_FALSE(ShouldRedirect("foo.sandbox.mydigipass.com")); | 813 EXPECT_FALSE(ShouldRedirect("foo.sandbox.mydigipass.com")); |
814 EXPECT_TRUE(ShouldRedirect("www.sandbox.mydigipass.com")); | 814 EXPECT_TRUE(ShouldRedirect("www.sandbox.mydigipass.com")); |
815 EXPECT_FALSE(ShouldRedirect("foo.www.sandbox.mydigipass.com")); | 815 EXPECT_FALSE(ShouldRedirect("foo.www.sandbox.mydigipass.com")); |
816 | 816 |
817 EXPECT_TRUE(ShouldRedirect("crypto.cat")); | 817 EXPECT_TRUE(ShouldRedirect("crypto.cat")); |
818 EXPECT_TRUE(ShouldRedirect("foo.crypto.cat")); | 818 EXPECT_TRUE(ShouldRedirect("foo.crypto.cat")); |
819 | 819 |
820 EXPECT_TRUE(ShouldRedirect("bigshinylock.minazo.net")); | |
821 EXPECT_TRUE(ShouldRedirect("foo.bigshinylock.minazo.net")); | |
Ryan Sleevi
2012/03/09 22:07:54
?
| |
822 | |
823 #if defined(OS_CHROMEOS) | 820 #if defined(OS_CHROMEOS) |
824 static const bool kTwitterHSTS = true; | 821 static const bool kTwitterHSTS = true; |
825 #else | 822 #else |
826 static const bool kTwitterHSTS = false; | 823 static const bool kTwitterHSTS = false; |
827 #endif | 824 #endif |
828 | 825 |
829 EXPECT_EQ(kTwitterHSTS, ShouldRedirect("twitter.com")); | 826 EXPECT_EQ(kTwitterHSTS, ShouldRedirect("twitter.com")); |
830 EXPECT_EQ(kTwitterHSTS, ShouldRedirect("www.twitter.com")); | 827 EXPECT_EQ(kTwitterHSTS, ShouldRedirect("www.twitter.com")); |
831 EXPECT_TRUE(HasPins("www.twitter.com")); | 828 EXPECT_TRUE(HasPins("www.twitter.com")); |
832 } | 829 } |
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1266 // Expect to fail for SNI hosts when not searching the SNI list: | 1263 // Expect to fail for SNI hosts when not searching the SNI list: |
1267 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( | 1264 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( |
1268 "gmail.com", false)); | 1265 "gmail.com", false)); |
1269 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( | 1266 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( |
1270 "googlegroups.com", false)); | 1267 "googlegroups.com", false)); |
1271 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( | 1268 EXPECT_FALSE(TransportSecurityState::IsGooglePinnedProperty( |
1272 "www.googlegroups.com", false)); | 1269 "www.googlegroups.com", false)); |
1273 } | 1270 } |
1274 | 1271 |
1275 } // namespace net | 1272 } // namespace net |
OLD | NEW |