Index: components/printing/test/print_web_view_helper_browsertest.cc |
diff --git a/components/printing/test/print_web_view_helper_browsertest.cc b/components/printing/test/print_web_view_helper_browsertest.cc |
index add6995883e3adafbf34b5d197d3a60d533144ba..0cd8115925d9340af1099f7d11340df55b785ff0 100644 |
--- a/components/printing/test/print_web_view_helper_browsertest.cc |
+++ b/components/printing/test/print_web_view_helper_browsertest.cc |
@@ -172,7 +172,7 @@ class PrintWebViewHelperTestBase : public content::RenderViewTest { |
void PrintWithJavaScript() { |
ExecuteJavaScriptForTests("window.print();"); |
- ProcessPendingMessages(); |
+ base::RunLoop().RunUntilIdle(); |
} |
// The renderer should be done calculating the number of rendered pages |
@@ -242,7 +242,7 @@ class PrintWebViewHelperTestBase : public content::RenderViewTest { |
#if BUILDFLAG(ENABLE_BASIC_PRINTING) |
void OnPrintPages() { |
GetPrintWebViewHelper()->OnPrintPages(); |
- ProcessPendingMessages(); |
+ base::RunLoop().RunUntilIdle(); |
} |
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) |
@@ -270,7 +270,7 @@ class PrintWebViewHelperTestBase : public content::RenderViewTest { |
#if BUILDFLAG(ENABLE_BASIC_PRINTING) |
void OnPrintForPrintPreview(const base::DictionaryValue& dict) { |
GetPrintWebViewHelper()->OnPrintForPrintPreview(dict); |
- ProcessPendingMessages(); |
+ base::RunLoop().RunUntilIdle(); |
} |
#endif // BUILDFLAG(ENABLE_BASIC_PRINTING) |
@@ -365,7 +365,7 @@ TEST_F(MAYBE_PrintWebViewHelperTest, AllowUserOriginatedPrinting) { |
SendWebMouseEvent(mouse_event); |
mouse_event.SetType(blink::WebInputEvent::kMouseUp); |
SendWebMouseEvent(mouse_event); |
- ProcessPendingMessages(); |
+ base::RunLoop().RunUntilIdle(); |
VerifyPageCount(1); |
VerifyPagesPrinted(true); |