OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <math.h> | 5 #include <math.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/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 InputRouterImplTest() {} | 144 InputRouterImplTest() {} |
145 virtual ~InputRouterImplTest() {} | 145 virtual ~InputRouterImplTest() {} |
146 | 146 |
147 protected: | 147 protected: |
148 // testing::Test | 148 // testing::Test |
149 virtual void SetUp() OVERRIDE { | 149 virtual void SetUp() OVERRIDE { |
150 browser_context_.reset(new TestBrowserContext()); | 150 browser_context_.reset(new TestBrowserContext()); |
151 process_.reset(new MockRenderProcessHost(browser_context_.get())); | 151 process_.reset(new MockRenderProcessHost(browser_context_.get())); |
152 client_.reset(new MockInputRouterClient()); | 152 client_.reset(new MockInputRouterClient()); |
153 ack_handler_.reset(new MockInputAckHandler()); | 153 ack_handler_.reset(new MockInputAckHandler()); |
154 CommandLine* command_line = CommandLine::ForCurrentProcess(); | 154 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
155 command_line->AppendSwitch(switches::kValidateInputEventStream); | 155 command_line->AppendSwitch(switches::kValidateInputEventStream); |
156 input_router_.reset(new InputRouterImpl(process_.get(), | 156 input_router_.reset(new InputRouterImpl(process_.get(), |
157 client_.get(), | 157 client_.get(), |
158 ack_handler_.get(), | 158 ack_handler_.get(), |
159 MSG_ROUTING_NONE, | 159 MSG_ROUTING_NONE, |
160 config_)); | 160 config_)); |
161 client_->set_input_router(input_router()); | 161 client_->set_input_router(input_router()); |
162 ack_handler_->set_input_router(input_router()); | 162 ack_handler_->set_input_router(input_router()); |
163 } | 163 } |
164 | 164 |
(...skipping 1551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1716 client_overscroll = client_->GetAndResetOverscroll(); | 1716 client_overscroll = client_->GetAndResetOverscroll(); |
1717 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, | 1717 EXPECT_EQ(wheel_overscroll.accumulated_overscroll, |
1718 client_overscroll.accumulated_overscroll); | 1718 client_overscroll.accumulated_overscroll); |
1719 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, | 1719 EXPECT_EQ(wheel_overscroll.latest_overscroll_delta, |
1720 client_overscroll.latest_overscroll_delta); | 1720 client_overscroll.latest_overscroll_delta); |
1721 EXPECT_EQ(wheel_overscroll.current_fling_velocity, | 1721 EXPECT_EQ(wheel_overscroll.current_fling_velocity, |
1722 client_overscroll.current_fling_velocity); | 1722 client_overscroll.current_fling_velocity); |
1723 } | 1723 } |
1724 | 1724 |
1725 } // namespace content | 1725 } // namespace content |
OLD | NEW |