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

Unified Diff: content/public/test/render_view_test.h

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
Index: content/public/test/render_view_test.h
diff --git a/content/public/test/render_view_test.h b/content/public/test/render_view_test.h
index db2eaef95a9d7f692efa8e02ffe348a7e199e5f3..a1d27c6f43f03d19d533a91ae951c4018883767e 100644
--- a/content/public/test/render_view_test.h
+++ b/content/public/test/render_view_test.h
@@ -11,8 +11,8 @@
#include <string>
#include "base/command_line.h"
-#include "base/message_loop/message_loop.h"
#include "base/strings/string16.h"
+#include "base/test/scoped_task_environment.h"
#include "base/test/test_io_thread.h"
#include "build/build_config.h"
#include "content/public/browser/native_web_keyboard_event.h"
@@ -75,9 +75,6 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient {
~RenderViewTest() override;
protected:
- // Spins the message loop to process all messages that are currently pending.
- void ProcessPendingMessages();
-
// Returns a pointer to the main frame.
blink::WebLocalFrame* GetMainFrame();
@@ -190,7 +187,9 @@ class RenderViewTest : public testing::Test, blink::WebLeakDetectorClient {
// blink::WebLeakDetectorClient implementation.
void OnLeakDetectionComplete(const Result& result) override;
- base::MessageLoop msg_loop_;
+ protected:
+ base::test::ScopedTaskEnvironment scoped_task_environment_;
+
std::unique_ptr<FakeCompositorDependencies> compositor_deps_;
std::unique_ptr<MockRenderProcess> mock_process_;
// We use a naked pointer because we don't want to expose RenderViewImpl in
« no previous file with comments | « components/printing/test/print_web_view_helper_browsertest.cc ('k') | content/public/test/render_view_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698