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

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

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 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
OLDNEW
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/variations_seed_simulator.h" 5 #include "components/variations/variations_seed_simulator.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "components/variations/processed_study.h" 10 #include "components/variations/processed_study.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 return param; 78 return param;
79 } 79 }
80 80
81 } // namespace 81 } // namespace
82 82
83 class VariationsSeedSimulatorTest : public ::testing::Test { 83 class VariationsSeedSimulatorTest : public ::testing::Test {
84 public: 84 public:
85 VariationsSeedSimulatorTest() : field_trial_list_(NULL) { 85 VariationsSeedSimulatorTest() : field_trial_list_(NULL) {
86 } 86 }
87 87
88 virtual ~VariationsSeedSimulatorTest() { 88 ~VariationsSeedSimulatorTest() override {
89 // Ensure that the maps are cleared between tests, since they are stored as 89 // Ensure that the maps are cleared between tests, since they are stored as
90 // process singletons. 90 // process singletons.
91 testing::ClearAllVariationIDs(); 91 testing::ClearAllVariationIDs();
92 testing::ClearAllVariationParams(); 92 testing::ClearAllVariationParams();
93 } 93 }
94 94
95 // Uses a VariationsSeedSimulator to simulate the differences between 95 // Uses a VariationsSeedSimulator to simulate the differences between
96 // |studies| and the current field trial state. 96 // |studies| and the current field trial state.
97 VariationsSeedSimulator::Result SimulateDifferences( 97 VariationsSeedSimulator::Result SimulateDifferences(
98 const std::vector<ProcessedStudy>& studies) { 98 const std::vector<ProcessedStudy>& studies) {
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 EXPECT_EQ("1 0 0", SimulateStudyDifferences(&study)); 372 EXPECT_EQ("1 0 0", SimulateStudyDifferences(&study));
373 experiment->set_type(Study_Experiment_Type_IGNORE_CHANGE); 373 experiment->set_type(Study_Experiment_Type_IGNORE_CHANGE);
374 EXPECT_EQ("0 0 0", SimulateStudyDifferences(&study)); 374 EXPECT_EQ("0 0 0", SimulateStudyDifferences(&study));
375 experiment->set_type(Study_Experiment_Type_KILL_BEST_EFFORT); 375 experiment->set_type(Study_Experiment_Type_KILL_BEST_EFFORT);
376 EXPECT_EQ("0 1 0", SimulateStudyDifferences(&study)); 376 EXPECT_EQ("0 1 0", SimulateStudyDifferences(&study));
377 experiment->set_type(Study_Experiment_Type_KILL_CRITICAL); 377 experiment->set_type(Study_Experiment_Type_KILL_CRITICAL);
378 EXPECT_EQ("0 0 1", SimulateStudyDifferences(&study)); 378 EXPECT_EQ("0 0 1", SimulateStudyDifferences(&study));
379 } 379 }
380 380
381 } // namespace variations 381 } // namespace variations
OLDNEW
« no previous file with comments | « components/variations/variations_seed_processor_unittest.cc ('k') | components/visitedlink/test/visitedlink_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698