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

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

Issue 2245483006: Revert of Disable MetricsServiceBrowserTest.CrashRenderers on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« 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 // 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 "components/metrics/metrics_service.h" 8 #include "components/metrics/metrics_service.h"
9 9
10 #include <string> 10 #include <string>
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 EXPECT_EQ(0, prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount)); 70 EXPECT_EQ(0, prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount));
71 // TODO(isherman): We should also verify that 71 // TODO(isherman): We should also verify that
72 // metrics::prefs::kStabilityExitedCleanly 72 // metrics::prefs::kStabilityExitedCleanly
73 // is set to true, but this preference isn't set until the browser 73 // is set to true, but this preference isn't set until the browser
74 // exits... it's not clear to me how to test that. 74 // exits... it's not clear to me how to test that.
75 } 75 }
76 76
77 // Flaky on Linux. See http://crbug.com/131094 77 // Flaky on Linux. See http://crbug.com/131094
78 // Child crashes fail the process on ASan (see crbug.com/411251, 78 // Child crashes fail the process on ASan (see crbug.com/411251,
79 // crbug.com/368525). 79 // crbug.com/368525).
80 // Flaky failing DCHECK on Windows, see crbug.com/635770 80 #if defined(OS_LINUX) || defined(ADDRESS_SANITIZER)
81 #if defined(OS_LINUX) || defined(ADDRESS_SANITIZER) || defined(OS_WIN)
82 #define MAYBE_CrashRenderers DISABLED_CrashRenderers 81 #define MAYBE_CrashRenderers DISABLED_CrashRenderers
83 #else 82 #else
84 #define MAYBE_CrashRenderers CrashRenderers 83 #define MAYBE_CrashRenderers CrashRenderers
85 #endif 84 #endif
86 IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, MAYBE_CrashRenderers) { 85 IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, MAYBE_CrashRenderers) {
87 OpenTabs(); 86 OpenTabs();
88 87
89 // Kill the process for one of the tabs. 88 // Kill the process for one of the tabs.
90 content::RenderProcessHostWatcher observer( 89 content::RenderProcessHostWatcher observer(
91 browser()->tab_strip_model()->GetActiveWebContents(), 90 browser()->tab_strip_model()->GetActiveWebContents(),
(...skipping 14 matching lines...) Expand all
106 105
107 // Verify that the expected stability metrics were recorded. 106 // Verify that the expected stability metrics were recorded.
108 EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityLaunchCount)); 107 EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityLaunchCount));
109 EXPECT_EQ(4, prefs->GetInteger(metrics::prefs::kStabilityPageLoadCount)); 108 EXPECT_EQ(4, prefs->GetInteger(metrics::prefs::kStabilityPageLoadCount));
110 EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount)); 109 EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount));
111 // TODO(isherman): We should also verify that 110 // TODO(isherman): We should also verify that
112 // metrics::prefs::kStabilityExitedCleanly 111 // metrics::prefs::kStabilityExitedCleanly
113 // is set to true, but this preference isn't set until the browser 112 // is set to true, but this preference isn't set until the browser
114 // exits... it's not clear to me how to test that. 113 // exits... it's not clear to me how to test that.
115 } 114 }
115
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