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

Unified Diff: components/printing/test/print_web_view_helper_browsertest.cc

Issue 2870633002: Use ScopedTaskEnvironment instead of MessageLoop in RenderViewTest. (Closed)
Patch Set: fix-build-error Created 3 years, 7 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 | « chrome/renderer/content_settings_observer_browsertest.cc ('k') | content/public/test/render_view_test.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « chrome/renderer/content_settings_observer_browsertest.cc ('k') | content/public/test/render_view_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698