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

Unified Diff: content/public/test/test_renderer_host.cc

Issue 2005013002: mac: ensure ui::Compositor exists for visible RWHVs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More unit test fixes Created 4 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/test_renderer_host.cc
diff --git a/content/public/test/test_renderer_host.cc b/content/public/test/test_renderer_host.cc
index 35d4ca6e77d892f42b351e309739d0520510e535..342da6efd826cfcbb926330f8dd177ae4c4a8d04 100644
--- a/content/public/test/test_renderer_host.cc
+++ b/content/public/test/test_renderer_host.cc
@@ -37,6 +37,10 @@
#include "ui/wm/core/default_activation_client.h"
#endif
+#if defined(OS_MACOSX)
+#include "ui/accelerated_widget_mac/window_resize_helper_mac.h"
+#endif
+
namespace content {
// RenderFrameHostTester ------------------------------------------------------
@@ -200,7 +204,7 @@ void RenderViewHostTestHarness::SetUp() {
new aura::test::AuraTestHelper(base::MessageLoopForUI::current()));
aura_test_helper_->SetUp(context_factory);
new wm::DefaultActivationClient(aura_test_helper_->root_window());
-#endif
+#endif // USE_AURA
sanity_checker_.reset(new ContentBrowserSanityChecker());
@@ -211,6 +215,13 @@ void RenderViewHostTestHarness::SetUp() {
if (IsBrowserSideNavigationEnabled())
BrowserSideNavigationSetUp();
+
+#if defined(OS_MACOSX)
+ if (!ui::WindowResizeHelperMac::Get()->task_runner()) {
enne (OOO) 2016/05/26 00:07:06 I'd love some feedback on what I should do here.
ccameron 2016/05/26 00:11:45 Adding a Shutdown that tests use to clear this sou
+ ui::WindowResizeHelperMac::Get()->Init(
+ base::MessageLoop::current()->task_runner());
+ }
+#endif // OS_MACOSX
}
void RenderViewHostTestHarness::TearDown() {

Powered by Google App Engine
This is Rietveld 408576698