Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(954)

Side by Side Diff: components/variations/variations_associated_data_unittest.cc

Issue 62953004: Support variation params for forcing_flag groups. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | components/variations/variations_seed_processor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/variations_associated_data.h" 5 #include "components/variations/variations_associated_data.h"
6 6
7 #include "base/metrics/field_trial.h" 7 #include "base/metrics/field_trial.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace chrome_variations { 10 namespace chrome_variations {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 48
49 class VariationsAssociatedDataTest : public ::testing::Test { 49 class VariationsAssociatedDataTest : public ::testing::Test {
50 public: 50 public:
51 VariationsAssociatedDataTest() : field_trial_list_(NULL) { 51 VariationsAssociatedDataTest() : field_trial_list_(NULL) {
52 } 52 }
53 53
54 virtual ~VariationsAssociatedDataTest() { 54 virtual ~VariationsAssociatedDataTest() {
55 // Ensure that the maps are cleared between tests, since they are stored as 55 // Ensure that the maps are cleared between tests, since they are stored as
56 // process singletons. 56 // process singletons.
57 testing::ClearAllVariationIDs(); 57 testing::ClearAllVariationIDs();
58 testing::ClearAllVariationParams();
58 } 59 }
59 60
60 private: 61 private:
61 base::FieldTrialList field_trial_list_; 62 base::FieldTrialList field_trial_list_;
62 63
63 DISALLOW_COPY_AND_ASSIGN(VariationsAssociatedDataTest); 64 DISALLOW_COPY_AND_ASSIGN(VariationsAssociatedDataTest);
64 }; 65 };
65 66
66 // Test that if the trial is immediately disabled, GetGoogleVariationID just 67 // Test that if the trial is immediately disabled, GetGoogleVariationID just
67 // returns the empty ID. 68 // returns the empty ID.
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 scoped_refptr<base::FieldTrial> trial( 302 scoped_refptr<base::FieldTrial> trial(
302 CreateFieldTrial(kTrialName, 100, "A", NULL)); 303 CreateFieldTrial(kTrialName, 100, "A", NULL));
303 ASSERT_FALSE(IsFieldTrialActive(kTrialName)); 304 ASSERT_FALSE(IsFieldTrialActive(kTrialName));
304 305
305 std::map<std::string, std::string> params; 306 std::map<std::string, std::string> params;
306 EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "x")); 307 EXPECT_EQ(std::string(), GetVariationParamValue(kTrialName, "x"));
307 ASSERT_TRUE(IsFieldTrialActive(kTrialName)); 308 ASSERT_TRUE(IsFieldTrialActive(kTrialName));
308 } 309 }
309 310
310 } // namespace chrome_variations 311 } // namespace chrome_variations
OLDNEW
« no previous file with comments | « no previous file | components/variations/variations_seed_processor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698