OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef COMPONENTS_NETWORK_TIME_NETWORK_TIME_TEST_UTILS_H_ |
| 6 #define COMPONENTS_NETWORK_TIME_NETWORK_TIME_TEST_UTILS_H_ |
| 7 |
| 8 #include <map> |
| 9 #include <memory> |
| 10 |
| 11 #include "base/macros.h" |
| 12 #include "testing/gtest/include/gtest/gtest.h" |
| 13 |
| 14 namespace base { |
| 15 namespace test { |
| 16 class ScopedFeatureList; |
| 17 }; // namespace test |
| 18 |
| 19 class FieldTrialList; |
| 20 } // namespace base |
| 21 |
| 22 namespace network_time { |
| 23 // A test fixture that allows configuring the network time queries field trial. |
| 24 class FieldTrialTest : public ::testing::Test { |
| 25 public: |
| 26 FieldTrialTest(); |
| 27 ~FieldTrialTest() override; |
| 28 |
| 29 protected: |
| 30 void SetNetworkQueriesWithVariationsService(bool enable, |
| 31 float query_probability); |
| 32 |
| 33 private: |
| 34 std::unique_ptr<base::FieldTrialList> field_trial_list_; |
| 35 std::unique_ptr<base::test::ScopedFeatureList> scoped_feature_list_; |
| 36 |
| 37 DISALLOW_COPY_AND_ASSIGN(FieldTrialTest); |
| 38 }; |
| 39 |
| 40 } // namespace network_time |
| 41 |
| 42 #endif // COMPONENTS_NETWORK_TIME_NETWORK_TIME_TEST_UTILS_H_ |
OLD | NEW |