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/message_loop/message_loop.h" |
10 #include "base/strings/string_split.h" | 10 #include "base/strings/string_split.h" |
11 #include "base/test/histogram_tester.h" | 11 #include "base/test/histogram_tester.h" |
12 #include "base/test/simple_test_clock.h" | 12 #include "base/test/simple_test_clock.h" |
13 #include "base/test/simple_test_tick_clock.h" | 13 #include "base/test/simple_test_tick_clock.h" |
| 14 #include "base/threading/thread_task_runner_handle.h" |
14 #include "base/time/default_clock.h" | 15 #include "base/time/default_clock.h" |
15 #include "base/time/default_tick_clock.h" | 16 #include "base/time/default_tick_clock.h" |
16 #include "components/network_time/network_time_test_utils.h" | 17 #include "components/network_time/network_time_test_utils.h" |
17 #include "components/network_time/network_time_tracker.h" | 18 #include "components/network_time/network_time_tracker.h" |
18 #include "components/prefs/testing_pref_service.h" | 19 #include "components/prefs/testing_pref_service.h" |
19 #include "net/base/net_errors.h" | 20 #include "net/base/net_errors.h" |
20 #include "net/cert/x509_cert_types.h" | 21 #include "net/cert/x509_cert_types.h" |
21 #include "net/cert/x509_certificate.h" | 22 #include "net/cert/x509_certificate.h" |
22 #include "net/test/cert_test_util.h" | 23 #include "net/test/cert_test_util.h" |
23 #include "net/test/embedded_test_server/embedded_test_server.h" | 24 #include "net/test/embedded_test_server/embedded_test_server.h" |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 clock->Advance(base::TimeDelta::FromDays(1)); | 446 clock->Advance(base::TimeDelta::FromDays(1)); |
446 // GetClockState() will fall back to the build time heuristic. | 447 // GetClockState() will fall back to the build time heuristic. |
447 ssl_errors::GetClockState(clock->Now(), &network_time_tracker); | 448 ssl_errors::GetClockState(clock->Now(), &network_time_tracker); |
448 histograms.ExpectTotalCount(kNetworkTimeHistogram, 8); | 449 histograms.ExpectTotalCount(kNetworkTimeHistogram, 8); |
449 histograms.ExpectBucketCount( | 450 histograms.ExpectBucketCount( |
450 kNetworkTimeHistogram, ssl_errors::NETWORK_CLOCK_STATE_UNKNOWN_SYNC_LOST, | 451 kNetworkTimeHistogram, ssl_errors::NETWORK_CLOCK_STATE_UNKNOWN_SYNC_LOST, |
451 1); | 452 1); |
452 | 453 |
453 io_thread.Stop(); | 454 io_thread.Stop(); |
454 } | 455 } |
OLD | NEW |