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

Side by Side Diff: chrome/browser/metrics/metrics_service_unittest.cc

Issue 174403003: Re-enable MetricsServiceTest.RegisterSyntheticTrial. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 years, 10 months 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/metrics/metrics_service.h" 5 #include "chrome/browser/metrics/metrics_service.h"
6 6
7 #include <ctype.h> 7 #include <ctype.h>
8 #include <string> 8 #include <string>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 EXPECT_TRUE(uma_log.has_system_profile()); 259 EXPECT_TRUE(uma_log.has_system_profile());
260 EXPECT_EQ(0, uma_log.user_action_event_size()); 260 EXPECT_EQ(0, uma_log.user_action_event_size());
261 EXPECT_EQ(0, uma_log.omnibox_event_size()); 261 EXPECT_EQ(0, uma_log.omnibox_event_size());
262 EXPECT_EQ(0, uma_log.histogram_event_size()); 262 EXPECT_EQ(0, uma_log.histogram_event_size());
263 EXPECT_EQ(0, uma_log.profiler_event_size()); 263 EXPECT_EQ(0, uma_log.profiler_event_size());
264 EXPECT_EQ(0, uma_log.perf_data_size()); 264 EXPECT_EQ(0, uma_log.perf_data_size());
265 265
266 EXPECT_EQ(1, uma_log.system_profile().stability().crash_count()); 266 EXPECT_EQ(1, uma_log.system_profile().stability().crash_count());
267 } 267 }
268 268
269 // Crashes on at least Mac and Linux. http://crbug.com/320433 269 TEST_F(MetricsServiceTest, RegisterSyntheticTrial) {
270 TEST_F(MetricsServiceTest, DISABLED_RegisterSyntheticTrial) {
271 MetricsService service; 270 MetricsService service;
272 271
273 // Add two synthetic trials and confirm that they show up in the list. 272 // Add two synthetic trials and confirm that they show up in the list.
274 SyntheticTrialGroup trial1(metrics::HashName("TestTrial1"), 273 SyntheticTrialGroup trial1(metrics::HashName("TestTrial1"),
275 metrics::HashName("Group1"), 274 metrics::HashName("Group1"),
276 base::TimeTicks::Now()); 275 base::TimeTicks::Now());
277 service.RegisterSyntheticFieldTrial(trial1); 276 service.RegisterSyntheticFieldTrial(trial1);
278 277
279 SyntheticTrialGroup trial2(metrics::HashName("TestTrial2"), 278 SyntheticTrialGroup trial2(metrics::HashName("TestTrial2"),
280 metrics::HashName("Group2"), 279 metrics::HashName("Group2"),
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
312 service.log_manager_.FinishCurrentLog(); 311 service.log_manager_.FinishCurrentLog();
313 service.log_manager_.BeginLoggingWithLog(new MetricsLog("clientID", 1), 312 service.log_manager_.BeginLoggingWithLog(new MetricsLog("clientID", 1),
314 MetricsLog::ONGOING_LOG); 313 MetricsLog::ONGOING_LOG);
315 service.GetCurrentSyntheticFieldTrials(&synthetic_trials); 314 service.GetCurrentSyntheticFieldTrials(&synthetic_trials);
316 EXPECT_EQ(3U, synthetic_trials.size()); 315 EXPECT_EQ(3U, synthetic_trials.size());
317 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial1", "Group2")); 316 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial1", "Group2"));
318 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial2", "Group2")); 317 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial2", "Group2"));
319 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial3", "Group3")); 318 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial3", "Group3"));
320 service.log_manager_.FinishCurrentLog(); 319 service.log_manager_.FinishCurrentLog();
321 } 320 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698