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

Unified Diff: chrome/browser/metrics/metrics_service_browsertest.cc

Issue 10022008: Fix flakiness in MetricsServiceTest.CrashRenderers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service_browsertest.cc
diff --git a/chrome/browser/metrics/metrics_service_browsertest.cc b/chrome/browser/metrics/metrics_service_browsertest.cc
index aee98aa62f370034e05b44b4377035a8665ccef4..211bac28a2d11ca222522c9ceebd97b18d8339e0 100644
--- a/chrome/browser/metrics/metrics_service_browsertest.cc
+++ b/chrome/browser/metrics/metrics_service_browsertest.cc
@@ -74,8 +74,7 @@ IN_PROC_BROWSER_TEST_F(MetricsServiceTest, CloseRenderersNormally) {
// exits... it's not clear to me how to test that.
}
-// Flaky: http://crbug.com/18738
-IN_PROC_BROWSER_TEST_F(MetricsServiceTest, FLAKY_CrashRenderers) {
+IN_PROC_BROWSER_TEST_F(MetricsServiceTest, CrashRenderers) {
OpenTabs();
// Kill the process for one of the tabs.
@@ -84,6 +83,9 @@ IN_PROC_BROWSER_TEST_F(MetricsServiceTest, FLAKY_CrashRenderers) {
content::NotificationService::AllSources());
ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUICrashURL));
observer.Wait();
+ // The MetricsService listens for the same notification, so process any
+ // pending tasks in the message loop to avoid race conditions.
+ ui_test_utils::RunAllPendingInMessageLoop();
jar (doing other things) 2012/04/07 02:46:48 This pattern always scares me... as it is most com
Ilya Sherman 2012/04/10 01:00:25 I think you're absolutely right. Added the loop.
jar (doing other things) 2012/04/10 01:32:22 The reason I was after outputting something is tha
Ilya Sherman 2012/04/10 01:33:53 Yes, the test logs definitely clearly indicate whi
// Verify that the expected stability metrics were recorded.
const PrefService* prefs = g_browser_process->local_state();
« 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