OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "chrome/browser/ssl/ssl_error_handler.h" | 5 #include "chrome/browser/ssl/ssl_error_handler.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/ptr_util.h" |
9 #include "base/metrics/field_trial.h" | 10 #include "base/metrics/field_trial.h" |
10 #include "base/run_loop.h" | 11 #include "base/run_loop.h" |
11 #include "base/test/histogram_tester.h" | 12 #include "base/test/histogram_tester.h" |
12 #include "base/test/simple_test_clock.h" | 13 #include "base/test/simple_test_clock.h" |
13 #include "base/test/simple_test_tick_clock.h" | 14 #include "base/test/simple_test_tick_clock.h" |
14 #include "base/time/time.h" | 15 #include "base/time/time.h" |
15 #include "chrome/browser/captive_portal/captive_portal_service.h" | 16 #include "chrome/browser/captive_portal/captive_portal_service.h" |
16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
17 #include "chrome/browser/ssl/common_name_mismatch_handler.h" | 18 #include "chrome/browser/ssl/common_name_mismatch_handler.h" |
18 #include "chrome/common/features.h" | 19 #include "chrome/common/features.h" |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 // Check that the histogram for the delay was recorded. | 541 // Check that the histogram for the delay was recorded. |
541 histograms.ExpectTotalCount(kCertDateErrorHistogram, 1); | 542 histograms.ExpectTotalCount(kCertDateErrorHistogram, 1); |
542 | 543 |
543 // Clear the error handler to test that, when the request completes, | 544 // Clear the error handler to test that, when the request completes, |
544 // it doesn't try to call a callback on a deleted SSLErrorHandler. | 545 // it doesn't try to call a callback on a deleted SSLErrorHandler. |
545 ClearErrorHandler(); | 546 ClearErrorHandler(); |
546 | 547 |
547 // Shut down the server to cancel the pending request. | 548 // Shut down the server to cancel the pending request. |
548 ASSERT_TRUE(test_server()->ShutdownAndWaitUntilComplete()); | 549 ASSERT_TRUE(test_server()->ShutdownAndWaitUntilComplete()); |
549 } | 550 } |
OLD | NEW |