| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/memory/shared_memory.h" | 9 #include "base/memory/shared_memory.h" |
| 10 #include "base/timer/timer.h" | 10 #include "base/timer/timer.h" |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 600 virtual void SetUp() { | 600 virtual void SetUp() { |
| 601 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 601 CommandLine* command_line = CommandLine::ForCurrentProcess(); |
| 602 command_line->AppendSwitch(switches::kValidateInputEventStream); | 602 command_line->AppendSwitch(switches::kValidateInputEventStream); |
| 603 | 603 |
| 604 browser_context_.reset(new TestBrowserContext()); | 604 browser_context_.reset(new TestBrowserContext()); |
| 605 delegate_.reset(new MockRenderWidgetHostDelegate()); | 605 delegate_.reset(new MockRenderWidgetHostDelegate()); |
| 606 process_ = new RenderWidgetHostProcess(browser_context_.get()); | 606 process_ = new RenderWidgetHostProcess(browser_context_.get()); |
| 607 #if defined(USE_AURA) | 607 #if defined(USE_AURA) |
| 608 ImageTransportFactory::InitializeForUnitTests( | 608 ImageTransportFactory::InitializeForUnitTests( |
| 609 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory)); | 609 scoped_ptr<ui::ContextFactory>(new ui::InProcessContextFactory)); |
| 610 aura::Env::CreateInstance(); | 610 aura::Env::CreateInstance(true); |
| 611 screen_.reset(aura::TestScreen::Create()); | 611 screen_.reset(aura::TestScreen::Create()); |
| 612 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); | 612 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get()); |
| 613 #endif | 613 #endif |
| 614 host_.reset( | 614 host_.reset( |
| 615 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); | 615 new MockRenderWidgetHost(delegate_.get(), process_, MSG_ROUTING_NONE)); |
| 616 view_.reset(new TestView(host_.get())); | 616 view_.reset(new TestView(host_.get())); |
| 617 host_->SetView(view_.get()); | 617 host_->SetView(view_.get()); |
| 618 host_->Init(); | 618 host_->Init(); |
| 619 } | 619 } |
| 620 virtual void TearDown() { | 620 virtual void TearDown() { |
| (...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2675 | 2675 |
| 2676 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). | 2676 // Tests RWHI::ForwardTouchEventWithLatencyInfo(). |
| 2677 PressTouchPoint(0, 1); | 2677 PressTouchPoint(0, 1); |
| 2678 SendTouchEvent(); | 2678 SendTouchEvent(); |
| 2679 CheckLatencyInfoComponentInMessage( | 2679 CheckLatencyInfoComponentInMessage( |
| 2680 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); | 2680 process_, GetLatencyComponentId(), WebInputEvent::TouchStart); |
| 2681 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); | 2681 SendInputEventACK(WebInputEvent::TouchStart, INPUT_EVENT_ACK_STATE_CONSUMED); |
| 2682 } | 2682 } |
| 2683 | 2683 |
| 2684 } // namespace content | 2684 } // namespace content |
| OLD | NEW |