| 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 "chrome/browser/android/net/external_estimate_provider_android.h" | 5 #include "chrome/browser/android/net/external_estimate_provider_android.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/at_exit.h" | 10 #include "base/at_exit.h" |
| 11 #include "base/test/histogram_tester.h" | 11 #include "base/test/histogram_tester.h" |
| 12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
| 13 #include "content/public/test/test_browser_thread_bundle.h" | 13 #include "content/public/test/test_browser_thread_bundle.h" |
| 14 #include "net/base/network_quality_estimator.h" | 14 #include "net/nqe/network_quality_estimator.h" |
| 15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 // Tests if the |ExternalEstimateProviderAndroid| APIs return false without the | 19 // Tests if the |ExternalEstimateProviderAndroid| APIs return false without the |
| 20 // downstream implementation. | 20 // downstream implementation. |
| 21 TEST(ExternalEstimateProviderAndroidTest, BasicsTest) { | 21 TEST(ExternalEstimateProviderAndroidTest, BasicsTest) { |
| 22 base::ShadowingAtExitManager at_exit_manager; | 22 base::ShadowingAtExitManager at_exit_manager; |
| 23 chrome::android::ExternalEstimateProviderAndroid external_estimate_provider; | 23 chrome::android::ExternalEstimateProviderAndroid external_estimate_provider; |
| 24 | 24 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 2); | 112 2); |
| 113 | 113 |
| 114 // EXTERNAL_ESTIMATE_PROVIDER_STATUS_CALLBACK | 114 // EXTERNAL_ESTIMATE_PROVIDER_STATUS_CALLBACK |
| 115 histogram_tester.ExpectBucketCount("NQE.ExternalEstimateProviderStatus", 4, | 115 histogram_tester.ExpectBucketCount("NQE.ExternalEstimateProviderStatus", 4, |
| 116 1); | 116 1); |
| 117 | 117 |
| 118 histogram_tester.ExpectTotalCount("NQE.ExternalEstimateProviderStatus", 6); | 118 histogram_tester.ExpectTotalCount("NQE.ExternalEstimateProviderStatus", 6); |
| 119 } | 119 } |
| 120 | 120 |
| 121 } // namespace | 121 } // namespace |
| OLD | NEW |