Chromium Code Reviews| Index: components/variations/study_filtering_unittest.cc |
| diff --git a/components/variations/study_filtering_unittest.cc b/components/variations/study_filtering_unittest.cc |
| index 1d70c48c8cf04ef5f78ca8781f783a95dfb375c6..18f2593d7c8cb6cfd6112fd424f71dff10c28fe2 100644 |
| --- a/components/variations/study_filtering_unittest.cc |
| +++ b/components/variations/study_filtering_unittest.cc |
| @@ -255,6 +255,22 @@ TEST(VariationsStudyFilteringTest, CheckStudyPlatform) { |
| } |
| } |
| +TEST(VariationsStudyFilteringTest, CheckStudyLowEndDevice) { |
| + Study::Filter filter; |
| + |
| + // Check that if the filter is not set, study applies to either low end. |
|
rkaplow
2017/07/06 17:49:49
nit - "either low end setting"? Current wording se
Alexei Svitkine (slow)
2017/07/11 15:08:14
Done.
|
| + EXPECT_TRUE(internal::CheckStudyLowEndDevice(filter, true)); |
| + EXPECT_TRUE(internal::CheckStudyLowEndDevice(filter, false)); |
| + |
| + filter.set_is_low_end_device(true); |
| + EXPECT_TRUE(internal::CheckStudyLowEndDevice(filter, true)); |
| + EXPECT_FALSE(internal::CheckStudyLowEndDevice(filter, false)); |
| + |
| + filter.set_is_low_end_device(false); |
| + EXPECT_FALSE(internal::CheckStudyLowEndDevice(filter, true)); |
| + EXPECT_TRUE(internal::CheckStudyLowEndDevice(filter, false)); |
| +} |
| + |
| TEST(VariationsStudyFilteringTest, CheckStudyStartDate) { |
| const base::Time now = base::Time::Now(); |
| const base::TimeDelta delta = base::TimeDelta::FromHours(1); |