| 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/certificate_reporting/error_report.h" | 5 #include "components/certificate_reporting/error_report.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 | 192 |
| 193 // Tests that information about relevant features are included in the | 193 // Tests that information about relevant features are included in the |
| 194 // report. | 194 // report. |
| 195 TEST(ErrorReportTest, FeatureInfo) { | 195 TEST(ErrorReportTest, FeatureInfo) { |
| 196 base::Thread io_thread("IO thread"); | 196 base::Thread io_thread("IO thread"); |
| 197 base::Thread::Options thread_options; | 197 base::Thread::Options thread_options; |
| 198 thread_options.message_loop_type = base::MessageLoop::TYPE_IO; | 198 thread_options.message_loop_type = base::MessageLoop::TYPE_IO; |
| 199 EXPECT_TRUE(io_thread.StartWithOptions(thread_options)); | 199 EXPECT_TRUE(io_thread.StartWithOptions(thread_options)); |
| 200 | 200 |
| 201 std::unique_ptr<network_time::FieldTrialTest> field_trial_test( | 201 std::unique_ptr<network_time::FieldTrialTest> field_trial_test( |
| 202 network_time::FieldTrialTest::CreateForUnitTest()); | 202 new network_time::FieldTrialTest()); |
| 203 field_trial_test->SetNetworkQueriesWithVariationsService( | 203 field_trial_test->SetNetworkQueriesWithVariationsService( |
| 204 true, 0.0, network_time::NetworkTimeTracker::FETCHES_ON_DEMAND_ONLY); | 204 true, 0.0, network_time::NetworkTimeTracker::FETCHES_ON_DEMAND_ONLY); |
| 205 | 205 |
| 206 TestingPrefServiceSimple pref_service; | 206 TestingPrefServiceSimple pref_service; |
| 207 network_time::NetworkTimeTracker::RegisterPrefs(pref_service.registry()); | 207 network_time::NetworkTimeTracker::RegisterPrefs(pref_service.registry()); |
| 208 network_time::NetworkTimeTracker network_time_tracker( | 208 network_time::NetworkTimeTracker network_time_tracker( |
| 209 base::MakeUnique<base::DefaultClock>(), | 209 base::MakeUnique<base::DefaultClock>(), |
| 210 base::MakeUnique<base::DefaultTickClock>(), &pref_service, | 210 base::MakeUnique<base::DefaultTickClock>(), &pref_service, |
| 211 new net::TestURLRequestContextGetter(io_thread.task_runner())); | 211 new net::TestURLRequestContextGetter(io_thread.task_runner())); |
| 212 | 212 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 230 EXPECT_EQ(CertLoggerFeaturesInfo::NetworkTimeQueryingInfo:: | 230 EXPECT_EQ(CertLoggerFeaturesInfo::NetworkTimeQueryingInfo:: |
| 231 NETWORK_TIME_FETCHES_ON_DEMAND_ONLY, | 231 NETWORK_TIME_FETCHES_ON_DEMAND_ONLY, |
| 232 parsed.features_info() | 232 parsed.features_info() |
| 233 .network_time_querying_info() | 233 .network_time_querying_info() |
| 234 .network_time_query_behavior()); | 234 .network_time_query_behavior()); |
| 235 } | 235 } |
| 236 | 236 |
| 237 } // namespace | 237 } // namespace |
| 238 | 238 |
| 239 } // namespace certificate_reporting | 239 } // namespace certificate_reporting |
| OLD | NEW |