OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/variations/experiment_labels.h" | 5 #include "components/variations/experiment_labels.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <set> | 9 #include <set> |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/basictypes.h" | 13 #include "base/macros.h" |
12 #include "base/metrics/field_trial.h" | 14 #include "base/metrics/field_trial.h" |
13 #include "base/strings/string_split.h" | 15 #include "base/strings/string_split.h" |
14 #include "base/strings/utf_string_conversions.h" | 16 #include "base/strings/utf_string_conversions.h" |
15 #include "components/variations/variations_associated_data.h" | 17 #include "components/variations/variations_associated_data.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
17 | 19 |
18 namespace variations { | 20 namespace variations { |
19 | 21 |
20 TEST(ExperimentLabelsTest, BuildGoogleUpdateExperimentLabel) { | 22 TEST(ExperimentLabelsTest, BuildGoogleUpdateExperimentLabel) { |
21 const variations::VariationID TEST_VALUE_A = 3300200; | 23 const variations::VariationID TEST_VALUE_A = 3300200; |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 | 187 |
186 for (size_t i = 0; i < arraysize(test_cases); ++i) { | 188 for (size_t i = 0; i < arraysize(test_cases); ++i) { |
187 std::string non_variation_labels = base::UTF16ToUTF8( | 189 std::string non_variation_labels = base::UTF16ToUTF8( |
188 ExtractNonVariationLabels( | 190 ExtractNonVariationLabels( |
189 base::ASCIIToUTF16(test_cases[i].input_label))); | 191 base::ASCIIToUTF16(test_cases[i].input_label))); |
190 EXPECT_EQ(test_cases[i].expected_output, non_variation_labels); | 192 EXPECT_EQ(test_cases[i].expected_output, non_variation_labels); |
191 } | 193 } |
192 } | 194 } |
193 | 195 |
194 } // namespace variations | 196 } // namespace variations |
OLD | NEW |