| OLD | NEW |
| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/bind.h" | 6 #include "base/bind.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "content/browser/browser_thread_impl.h" | 10 #include "content/browser/browser_thread_impl.h" |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 return handle_mouse_event_; | 616 return handle_mouse_event_; |
| 617 } | 617 } |
| 618 | 618 |
| 619 protected: | 619 protected: |
| 620 // testing::Test | 620 // testing::Test |
| 621 virtual void SetUp() { | 621 virtual void SetUp() { |
| 622 browser_context_.reset(new TestBrowserContext()); | 622 browser_context_.reset(new TestBrowserContext()); |
| 623 delegate_.reset(new MockRenderWidgetHostDelegate()); | 623 delegate_.reset(new MockRenderWidgetHostDelegate()); |
| 624 process_ = new RenderWidgetHostProcess(browser_context_.get()); | 624 process_ = new RenderWidgetHostProcess(browser_context_.get()); |
| 625 #if defined(USE_AURA) | 625 #if defined(USE_AURA) |
| 626 aura::Env::CreateInstance(); |
| 626 screen_.reset(aura::TestScreen::Create()); | 627 screen_.reset(aura::TestScreen::Create()); |
| 627 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); | 628 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); |
| 628 #endif | 629 #endif |
| 629 host_.reset( | 630 host_.reset( |
| 630 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); | 631 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); |
| 631 view_.reset(new TestView(host_.get())); | 632 view_.reset(new TestView(host_.get())); |
| 632 host_->SetView(view_.get()); | 633 host_->SetView(view_.get()); |
| 633 host_->Init(); | 634 host_->Init(); |
| 634 } | 635 } |
| 635 virtual void TearDown() { | 636 virtual void TearDown() { |
| (...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2522 | 2523 |
| 2523 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { | 2524 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { |
| 2524 host_->SetupForInputRouterTest(); | 2525 host_->SetupForInputRouterTest(); |
| 2525 | 2526 |
| 2526 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); | 2527 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); |
| 2527 | 2528 |
| 2528 EXPECT_TRUE(host_->mock_input_router()->message_received_); | 2529 EXPECT_TRUE(host_->mock_input_router()->message_received_); |
| 2529 } | 2530 } |
| 2530 | 2531 |
| 2531 } // namespace content | 2532 } // namespace content |
| OLD | NEW |