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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest_unittest.cc

Issue 2710053003: Keep a TaskScheduler instance in RenderWidgetHostViewGuestTest (Closed)
Patch Set: +comment Created 3 years, 10 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: content/browser/frame_host/render_widget_host_view_guest_unittest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
index bfba0e346f3dedd4af988d1a11d301090a27b85b..6705729aace85e899da2816e49f759ac80e3da72 100644
--- a/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest_unittest.cc
@@ -11,6 +11,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/single_thread_task_runner.h"
+#include "base/test/scoped_task_scheduler.h"
#include "build/build_config.h"
#include "cc/surfaces/surface.h"
#include "cc/surfaces/surface_factory.h"
@@ -53,7 +54,7 @@ class MockRenderWidgetHostDelegate : public RenderWidgetHostDelegate {
class RenderWidgetHostViewGuestTest : public testing::Test {
public:
- RenderWidgetHostViewGuestTest() {}
+ RenderWidgetHostViewGuestTest() : task_scheduler_(&message_loop_) {}
void SetUp() override {
#if !defined(OS_ANDROID)
@@ -96,6 +97,10 @@ class RenderWidgetHostViewGuestTest : public testing::Test {
protected:
base::MessageLoopForUI message_loop_;
+
+ // Needed by base::PostTaskWithTraits in RenderWidgetHostImpl constructor.
+ base::test::ScopedTaskScheduler task_scheduler_;
+
std::unique_ptr<BrowserContext> browser_context_;
MockRenderWidgetHostDelegate delegate_;
@@ -114,13 +119,7 @@ class RenderWidgetHostViewGuestTest : public testing::Test {
} // namespace
-// Fails on Windows, crbug.com/695375.
-#if defined(OS_WIN)
-#define MAYBE_VisibilityTest DISABLED_VisibilityTest
-#else
-#define MAYBE_VisibilityTest VisibilityTest
-#endif
-TEST_F(RenderWidgetHostViewGuestTest, MAYBE_VisibilityTest) {
+TEST_F(RenderWidgetHostViewGuestTest, VisibilityTest) {
view_->Show();
ASSERT_TRUE(view_->IsShowing());
« 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