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

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

Issue 4087009: Update a bunch of FLAKY_ tests to match current reality (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 // Tests the MetricsService stat recording to make sure that the numbers are 5 // Tests the MetricsService stat recording to make sure that the numbers are
6 // what we expect. 6 // what we expect.
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/file_path.h" 10 #include "base/file_path.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); 66 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true);
67 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0); 67 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0);
68 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0); 68 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0);
69 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); 69 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
70 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly)); 70 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly));
71 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount)); 71 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount));
72 EXPECT_EQ(3, local_state->GetInteger(prefs::kStabilityPageLoadCount)); 72 EXPECT_EQ(3, local_state->GetInteger(prefs::kStabilityPageLoadCount));
73 EXPECT_EQ(0, local_state->GetInteger(prefs::kStabilityRendererCrashCount)); 73 EXPECT_EQ(0, local_state->GetInteger(prefs::kStabilityRendererCrashCount));
74 } 74 }
75 75
76 #if defined(OS_WIN)
77 // http://crbug.com/32048
78 #define CrashRenderers FLAKY_CrashRenders
79 #endif
80 TEST_F(MetricsServiceTest, CrashRenderers) { 76 TEST_F(MetricsServiceTest, CrashRenderers) {
81 // This doesn't make sense to test in single process mode. 77 // This doesn't make sense to test in single process mode.
82 if (in_process_renderer_) 78 if (in_process_renderer_)
83 return; 79 return;
84 80
85 OpenTabs(); 81 OpenTabs();
86 82
87 { 83 {
88 // Limit the lifetime of various automation proxies used here. We must 84 // Limit the lifetime of various automation proxies used here. We must
89 // destroy them before calling QuitBrowser. 85 // destroy them before calling QuitBrowser.
(...skipping 22 matching lines...) Expand all
112 scoped_ptr<PrefService> local_state(GetLocalState()); 108 scoped_ptr<PrefService> local_state(GetLocalState());
113 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); 109 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true);
114 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0); 110 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0);
115 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0); 111 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0);
116 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); 112 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
117 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly)); 113 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly));
118 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount)); 114 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount));
119 EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount)); 115 EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount));
120 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount)); 116 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount));
121 } 117 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698