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

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

Issue 176423002: Revert 252507 "Re-enable MetricsServiceTest.RegisterSyntheticTrial." (Closed) Base URL: svn://svn.chromium.org/chrome/
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 TEST_F(MetricsServiceTest, RegisterSyntheticTrial) { 269 // Crashes on at least Mac and Linux. http://crbug.com/320433
270 TEST_F(MetricsServiceTest, DISABLED_RegisterSyntheticTrial) {
270 MetricsService service; 271 MetricsService service;
271 272
272 // Add two synthetic trials and confirm that they show up in the list. 273 // Add two synthetic trials and confirm that they show up in the list.
273 SyntheticTrialGroup trial1(metrics::HashName("TestTrial1"), 274 SyntheticTrialGroup trial1(metrics::HashName("TestTrial1"),
274 metrics::HashName("Group1"), 275 metrics::HashName("Group1"),
275 base::TimeTicks::Now()); 276 base::TimeTicks::Now());
276 service.RegisterSyntheticFieldTrial(trial1); 277 service.RegisterSyntheticFieldTrial(trial1);
277 278
278 SyntheticTrialGroup trial2(metrics::HashName("TestTrial2"), 279 SyntheticTrialGroup trial2(metrics::HashName("TestTrial2"),
279 metrics::HashName("Group2"), 280 metrics::HashName("Group2"),
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 service.log_manager_.FinishCurrentLog(); 312 service.log_manager_.FinishCurrentLog();
312 service.log_manager_.BeginLoggingWithLog(new MetricsLog("clientID", 1), 313 service.log_manager_.BeginLoggingWithLog(new MetricsLog("clientID", 1),
313 MetricsLog::ONGOING_LOG); 314 MetricsLog::ONGOING_LOG);
314 service.GetCurrentSyntheticFieldTrials(&synthetic_trials); 315 service.GetCurrentSyntheticFieldTrials(&synthetic_trials);
315 EXPECT_EQ(3U, synthetic_trials.size()); 316 EXPECT_EQ(3U, synthetic_trials.size());
316 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial1", "Group2")); 317 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial1", "Group2"));
317 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial2", "Group2")); 318 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial2", "Group2"));
318 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial3", "Group3")); 319 EXPECT_TRUE(HasSyntheticTrial(synthetic_trials, "TestTrial3", "Group3"));
319 service.log_manager_.FinishCurrentLog(); 320 service.log_manager_.FinishCurrentLog();
320 } 321 }
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