OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "net/disk_cache/simple/simple_experiment.h" | 5 #include "net/disk_cache/simple/simple_experiment.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <utility> | 10 #include <utility> |
11 | 11 |
12 #include "base/feature_list.h" | 12 #include "base/feature_list.h" |
| 13 #include "base/memory/ptr_util.h" |
13 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
14 #include "base/metrics/field_trial_param_associator.h" | 15 #include "base/metrics/field_trial_param_associator.h" |
15 #include "base/optional.h" | 16 #include "base/optional.h" |
16 #include "base/strings/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
17 #include "base/test/mock_entropy_provider.h" | 18 #include "base/test/mock_entropy_provider.h" |
18 #include "base/test/scoped_feature_list.h" | 19 #include "base/test/scoped_feature_list.h" |
19 #include "net/base/cache_type.h" | 20 #include "net/base/cache_type.h" |
20 #include "testing/gtest/include/gtest/gtest.h" | 21 #include "testing/gtest/include/gtest/gtest.h" |
21 | 22 |
22 namespace disk_cache { | 23 namespace disk_cache { |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 const uint32_t kParam = 125u; | 82 const uint32_t kParam = 125u; |
82 base::test::ScopedFeatureList scoped_feature_list; | 83 base::test::ScopedFeatureList scoped_feature_list; |
83 ConfigureSizeFieldTrial(true, base::Optional<uint32_t>(kParam)); | 84 ConfigureSizeFieldTrial(true, base::Optional<uint32_t>(kParam)); |
84 | 85 |
85 SimpleExperiment experiment = GetSimpleExperiment(net::APP_CACHE); | 86 SimpleExperiment experiment = GetSimpleExperiment(net::APP_CACHE); |
86 EXPECT_EQ(SimpleExperimentType::NONE, experiment.type); | 87 EXPECT_EQ(SimpleExperimentType::NONE, experiment.type); |
87 EXPECT_EQ(0u, experiment.param); | 88 EXPECT_EQ(0u, experiment.param); |
88 } | 89 } |
89 | 90 |
90 } // namespace disk_cache | 91 } // namespace disk_cache |
OLD | NEW |