| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "components/ssl_errors/error_classification.h" | 5 #include "components/ssl_errors/error_classification.h" |
| 6 | 6 |
| 7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
| 10 #include "base/time/default_clock.h" | 11 #include "base/time/default_clock.h" |
| 11 #include "base/time/default_tick_clock.h" | 12 #include "base/time/default_tick_clock.h" |
| 12 #include "components/network_time/network_time_tracker.h" | 13 #include "components/network_time/network_time_tracker.h" |
| 13 #include "components/prefs/testing_pref_service.h" | 14 #include "components/prefs/testing_pref_service.h" |
| 14 #include "net/base/net_errors.h" | 15 #include "net/base/net_errors.h" |
| 15 #include "net/cert/x509_cert_types.h" | 16 #include "net/cert/x509_cert_types.h" |
| 16 #include "net/cert/x509_certificate.h" | 17 #include "net/cert/x509_certificate.h" |
| 17 #include "net/test/cert_test_util.h" | 18 #include "net/test/cert_test_util.h" |
| 18 #include "net/test/test_certificate_data.h" | 19 #include "net/test/test_certificate_data.h" |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 ssl_errors::ClockState::CLOCK_STATE_PAST, | 256 ssl_errors::ClockState::CLOCK_STATE_PAST, |
| 256 ssl_errors::GetClockState(base::Time::Now(), &network_time_tracker)); | 257 ssl_errors::GetClockState(base::Time::Now(), &network_time_tracker)); |
| 257 | 258 |
| 258 // Now set the build time to something reasonable. We should be | 259 // Now set the build time to something reasonable. We should be |
| 259 // back to the know-nothing state. | 260 // back to the know-nothing state. |
| 260 ssl_errors::SetBuildTimeForTesting(base::Time::Now()); | 261 ssl_errors::SetBuildTimeForTesting(base::Time::Now()); |
| 261 EXPECT_EQ( | 262 EXPECT_EQ( |
| 262 ssl_errors::ClockState::CLOCK_STATE_UNKNOWN, | 263 ssl_errors::ClockState::CLOCK_STATE_UNKNOWN, |
| 263 ssl_errors::GetClockState(base::Time::Now(), &network_time_tracker)); | 264 ssl_errors::GetClockState(base::Time::Now(), &network_time_tracker)); |
| 264 } | 265 } |
| OLD | NEW |