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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_aura_unittest.cc

Issue 250113002: Move DefaultActivationClient to wm/core (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 29 matching lines...) Expand all
40 #include "ui/aura/test/test_window_delegate.h" 40 #include "ui/aura/test/test_window_delegate.h"
41 #include "ui/aura/window.h" 41 #include "ui/aura/window.h"
42 #include "ui/aura/window_event_dispatcher.h" 42 #include "ui/aura/window_event_dispatcher.h"
43 #include "ui/aura/window_observer.h" 43 #include "ui/aura/window_observer.h"
44 #include "ui/base/ui_base_types.h" 44 #include "ui/base/ui_base_types.h"
45 #include "ui/compositor/compositor.h" 45 #include "ui/compositor/compositor.h"
46 #include "ui/compositor/test/draw_waiter_for_test.h" 46 #include "ui/compositor/test/draw_waiter_for_test.h"
47 #include "ui/compositor/test/in_process_context_factory.h" 47 #include "ui/compositor/test/in_process_context_factory.h"
48 #include "ui/events/event.h" 48 #include "ui/events/event.h"
49 #include "ui/events/event_utils.h" 49 #include "ui/events/event_utils.h"
50 #include "ui/wm/core/default_activation_client.h"
50 51
51 using testing::_; 52 using testing::_;
52 53
53 namespace content { 54 namespace content {
54 namespace { 55 namespace {
55 56
56 // Simple screen position client to test coordinate system conversion. 57 // Simple screen position client to test coordinate system conversion.
57 class TestScreenPositionClient 58 class TestScreenPositionClient
58 : public aura::client::ScreenPositionClient { 59 : public aura::client::ScreenPositionClient {
59 public: 60 public:
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 class RenderWidgetHostViewAuraTest : public testing::Test { 201 class RenderWidgetHostViewAuraTest : public testing::Test {
201 public: 202 public:
202 RenderWidgetHostViewAuraTest() 203 RenderWidgetHostViewAuraTest()
203 : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {} 204 : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {}
204 205
205 void SetUpEnvironment() { 206 void SetUpEnvironment() {
206 ImageTransportFactory::InitializeForUnitTests( 207 ImageTransportFactory::InitializeForUnitTests(
207 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory)); 208 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory));
208 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); 209 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
209 aura_test_helper_->SetUp(); 210 aura_test_helper_->SetUp();
211 new wm::DefaultActivationClient(aura_test_helper_->root_window());
210 212
211 browser_context_.reset(new TestBrowserContext); 213 browser_context_.reset(new TestBrowserContext);
212 process_host_ = new MockRenderProcessHost(browser_context_.get()); 214 process_host_ = new MockRenderProcessHost(browser_context_.get());
213 215
214 sink_ = &process_host_->sink(); 216 sink_ = &process_host_->sink();
215 217
216 parent_host_ = new RenderWidgetHostImpl( 218 parent_host_ = new RenderWidgetHostImpl(
217 &delegate_, process_host_, MSG_ROUTING_NONE, false); 219 &delegate_, process_host_, MSG_ROUTING_NONE, false);
218 parent_view_ = static_cast<RenderWidgetHostViewAura*>( 220 parent_view_ = static_cast<RenderWidgetHostViewAura*>(
219 RenderWidgetHostView::CreateViewForWidget(parent_host_)); 221 RenderWidgetHostView::CreateViewForWidget(parent_host_));
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 const IPC::Message *message = sink_->GetFirstMessageMatching( 1408 const IPC::Message *message = sink_->GetFirstMessageMatching(
1407 ViewMsg_Resize::ID); 1409 ViewMsg_Resize::ID);
1408 ASSERT_TRUE(message != NULL); 1410 ASSERT_TRUE(message != NULL);
1409 1411
1410 ViewMsg_Resize::Param params; 1412 ViewMsg_Resize::Param params;
1411 ViewMsg_Resize::Read(message, &params); 1413 ViewMsg_Resize::Read(message, &params);
1412 EXPECT_EQ(60, params.a.visible_viewport_size.height()); 1414 EXPECT_EQ(60, params.a.visible_viewport_size.height());
1413 } 1415 }
1414 1416
1415 } // namespace content 1417 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/media/capture/desktop_capture_device_aura_unittest.cc ('k') | content/content_tests.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698