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(); |