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

Unified Diff: base/metrics/field_trial_unittest.cc

Issue 2546653002: Store and retrieve features from shared memory (Closed)
Patch Set: ifdef InstantiateAllocator test out for ios Created 4 years 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 side-by-side diff with in-line comments
Download patch
Index: base/metrics/field_trial_unittest.cc
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc
index 6c070268f1c2fb057d85c28c2418474d37de32dc..d2597f9eeb76ca5fc5d5d8eee6e6948261d27e26 100644
--- a/base/metrics/field_trial_unittest.cc
+++ b/base/metrics/field_trial_unittest.cc
@@ -1145,15 +1145,21 @@ TEST(FieldTrialListTest, TestCopyFieldTrialStateToFlags) {
base::FilePath test_file_path = base::FilePath(FILE_PATH_LITERAL("Program"));
base::CommandLine cmd_line = base::CommandLine(test_file_path);
const char field_trial_handle[] = "test-field-trial-handle";
+ const char enable_features_switch[] = "test-enable-features";
+ const char disable_features_switch[] = "test-disable-features";
- base::FieldTrialList::CopyFieldTrialStateToFlags(field_trial_handle,
- &cmd_line);
+ base::FieldTrialList::CopyFieldTrialStateToFlags(
+ field_trial_handle, enable_features_switch, disable_features_switch,
+ &cmd_line);
EXPECT_TRUE(cmd_line.HasSwitch(field_trial_handle) ||
cmd_line.HasSwitch(switches::kForceFieldTrials));
}
#endif
+#if !defined(OS_IOS)
TEST(FieldTrialListTest, InstantiateAllocator) {
+ std::unique_ptr<FeatureList> feature_list(new FeatureList);
Alexei Svitkine (slow) 2016/12/02 20:14:28 This doesn't actually register the instance. (It d
lawrencewu 2016/12/02 20:36:32 Done. This also turned out to be the cause of thos
+
FieldTrialList field_trial_list(nullptr);
FieldTrialList::CreateFieldTrial("Trial1", "Group1");
@@ -1168,6 +1174,7 @@ TEST(FieldTrialListTest, InstantiateAllocator) {
EXPECT_EQ(memory, new_memory);
EXPECT_EQ(used, new_used);
}
+#endif
TEST(FieldTrialListTest, AddTrialsToAllocator) {
std::string save_string;

Powered by Google App Engine
This is Rietveld 408576698