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

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

Issue 261553002: Revert of 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"
51 50
52 using testing::_; 51 using testing::_;
53 52
54 namespace content { 53 namespace content {
55 namespace { 54 namespace {
56 55
57 // Simple screen position client to test coordinate system conversion. 56 // Simple screen position client to test coordinate system conversion.
58 class TestScreenPositionClient 57 class TestScreenPositionClient
59 : public aura::client::ScreenPositionClient { 58 : public aura::client::ScreenPositionClient {
60 public: 59 public:
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 class RenderWidgetHostViewAuraTest : public testing::Test { 200 class RenderWidgetHostViewAuraTest : public testing::Test {
202 public: 201 public:
203 RenderWidgetHostViewAuraTest() 202 RenderWidgetHostViewAuraTest()
204 : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {} 203 : browser_thread_for_ui_(BrowserThread::UI, &message_loop_) {}
205 204
206 void SetUpEnvironment() { 205 void SetUpEnvironment() {
207 ImageTransportFactory::InitializeForUnitTests( 206 ImageTransportFactory::InitializeForUnitTests(
208 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory)); 207 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory));
209 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_)); 208 aura_test_helper_.reset(new aura::test::AuraTestHelper(&message_loop_));
210 aura_test_helper_->SetUp(); 209 aura_test_helper_->SetUp();
211 new wm::DefaultActivationClient(aura_test_helper_->root_window());
212 210
213 browser_context_.reset(new TestBrowserContext); 211 browser_context_.reset(new TestBrowserContext);
214 process_host_ = new MockRenderProcessHost(browser_context_.get()); 212 process_host_ = new MockRenderProcessHost(browser_context_.get());
215 213
216 sink_ = &process_host_->sink(); 214 sink_ = &process_host_->sink();
217 215
218 parent_host_ = new RenderWidgetHostImpl( 216 parent_host_ = new RenderWidgetHostImpl(
219 &delegate_, process_host_, MSG_ROUTING_NONE, false); 217 &delegate_, process_host_, MSG_ROUTING_NONE, false);
220 parent_view_ = static_cast<RenderWidgetHostViewAura*>( 218 parent_view_ = static_cast<RenderWidgetHostViewAura*>(
221 RenderWidgetHostView::CreateViewForWidget(parent_host_)); 219 RenderWidgetHostView::CreateViewForWidget(parent_host_));
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after
1408 const IPC::Message *message = sink_->GetFirstMessageMatching( 1406 const IPC::Message *message = sink_->GetFirstMessageMatching(
1409 ViewMsg_Resize::ID); 1407 ViewMsg_Resize::ID);
1410 ASSERT_TRUE(message != NULL); 1408 ASSERT_TRUE(message != NULL);
1411 1409
1412 ViewMsg_Resize::Param params; 1410 ViewMsg_Resize::Param params;
1413 ViewMsg_Resize::Read(message, &params); 1411 ViewMsg_Resize::Read(message, &params);
1414 EXPECT_EQ(60, params.a.visible_viewport_size.height()); 1412 EXPECT_EQ(60, params.a.visible_viewport_size.height());
1415 } 1413 }
1416 1414
1417 } // namespace content 1415 } // 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