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

Unified Diff: content/test/test_render_view_host.cc

Issue 2861533003: Backfill some UI tests. (Closed)
Patch Set: fix silent merge conflict 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 | « content/test/test_render_view_host.h ('k') | ui/views/window/dialog_client_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_render_view_host.cc
diff --git a/content/test/test_render_view_host.cc b/content/test/test_render_view_host.cc
index ece1a637fb4177cc712b0a947f755e58d90785ca..527fac259ae79809673e559cd3bdc60d79a73ebf 100644
--- a/content/test/test_render_view_host.cc
+++ b/content/test/test_render_view_host.cc
@@ -30,8 +30,13 @@
#include "media/base/video_frame.h"
#include "ui/aura/env.h"
#include "ui/compositor/compositor.h"
+#include "ui/compositor/layer_type.h"
#include "ui/gfx/geometry/rect.h"
+#if defined(USE_AURA)
+#include "ui/aura/test/test_window_delegate.h"
+#endif
+
namespace content {
void InitNavigateParams(FrameHostMsg_DidCommitProvisionalLoad_Params* params,
@@ -73,6 +78,13 @@ TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh)
#endif
rwh_->SetView(this);
+
+#if defined(USE_AURA)
+ window_.reset(new aura::Window(
+ aura::test::TestWindowDelegate::CreateSelfDestroyingDelegate()));
+ window_->set_owned_by_parent(false);
+ window_->Init(ui::LayerType::LAYER_NOT_DRAWN);
+#endif
}
TestRenderWidgetHostView::~TestRenderWidgetHostView() {
@@ -91,7 +103,11 @@ gfx::Vector2dF TestRenderWidgetHostView::GetLastScrollOffset() const {
}
gfx::NativeView TestRenderWidgetHostView::GetNativeView() const {
+#if defined(USE_AURA)
+ return window_.get();
+#else
return nullptr;
+#endif
}
gfx::NativeViewAccessible TestRenderWidgetHostView::GetNativeViewAccessible() {
« no previous file with comments | « content/test/test_render_view_host.h ('k') | ui/views/window/dialog_client_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698