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

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

Issue 7640015: Marking MetricsServiceTest.CloseRenderersNormally flaky on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 59 }
60 #if defined(OS_WIN) 60 #if defined(OS_WIN)
61 // This is not really Windows-specific, the transition is just being done 61 // This is not really Windows-specific, the transition is just being done
62 // in stages, and Windows is first. See below for more info. 62 // in stages, and Windows is first. See below for more info.
63 // TODO(phajdan.jr): Remove #ifdef after fixing http://crbug.com/61062. 63 // TODO(phajdan.jr): Remove #ifdef after fixing http://crbug.com/61062.
64 private: 64 private:
65 NotificationService notification_service_; 65 NotificationService notification_service_;
66 #endif 66 #endif
67 }; 67 };
68 68
69 TEST_F(MetricsServiceTest, CloseRenderersNormally) { 69 #if defined(OS_MACOSX)
70 // Flaky across all Mac bots: http://crbug.com/92635
71 #define MAYBE_CloseRenderersNormally FLAKY_CloseRenderersNormally
72 #else
73 #define MAYBE_CloseRenderersNormally CloseRenderersNormally
74 #endif
75
76 TEST_F(MetricsServiceTest, MAYBE_CloseRenderersNormally) {
70 OpenTabs(); 77 OpenTabs();
71 QuitBrowser(); 78 QuitBrowser();
72 79
73 scoped_ptr<PrefService> local_state(GetLocalState()); 80 scoped_ptr<PrefService> local_state(GetLocalState());
74 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true); 81 local_state->RegisterBooleanPref(prefs::kStabilityExitedCleanly, true);
75 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0); 82 local_state->RegisterIntegerPref(prefs::kStabilityLaunchCount, 0);
76 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0); 83 local_state->RegisterIntegerPref(prefs::kStabilityPageLoadCount, 0);
77 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0); 84 local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
78 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly)); 85 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly));
79 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount)); 86 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount));
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly)); 133 EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly));
127 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount)); 134 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount));
128 #if defined(TOUCH_UI) 135 #if defined(TOUCH_UI)
129 // The keyboard page loads for touchui. 136 // The keyboard page loads for touchui.
130 EXPECT_EQ(5, local_state->GetInteger(prefs::kStabilityPageLoadCount)); 137 EXPECT_EQ(5, local_state->GetInteger(prefs::kStabilityPageLoadCount));
131 #else 138 #else
132 EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount)); 139 EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount));
133 #endif 140 #endif
134 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount)); 141 EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount));
135 } 142 }
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