OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/input/touch_emulator.h" | 5 #include "content/browser/renderer_host/input/touch_emulator.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
13 #include "base/time/time.h" | 13 #include "base/time/time.h" |
14 #include "content/browser/renderer_host/input/touch_emulator_client.h" | 14 #include "content/browser/renderer_host/input/touch_emulator_client.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 16 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" |
16 #include "ui/events/blink/web_input_event_traits.h" | 17 #include "ui/events/blink/web_input_event_traits.h" |
17 | 18 |
18 using blink::WebGestureEvent; | 19 using blink::WebGestureEvent; |
19 using blink::WebInputEvent; | 20 using blink::WebInputEvent; |
20 using blink::WebKeyboardEvent; | 21 using blink::WebKeyboardEvent; |
21 using blink::WebMouseEvent; | 22 using blink::WebMouseEvent; |
22 using blink::WebMouseWheelEvent; | 23 using blink::WebMouseWheelEvent; |
23 using blink::WebTouchEvent; | 24 using blink::WebTouchEvent; |
24 using blink::WebTouchPoint; | 25 using blink::WebTouchPoint; |
25 | 26 |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 emulator()->SetDeviceScaleFactor(1.0f); | 594 emulator()->SetDeviceScaleFactor(1.0f); |
594 EXPECT_EQ(1.0f, GetCursorScaleFactor()); | 595 EXPECT_EQ(1.0f, GetCursorScaleFactor()); |
595 | 596 |
596 TouchEmulator another(this, 4.0f); | 597 TouchEmulator another(this, 4.0f); |
597 EXPECT_EQ(1.0f, GetCursorScaleFactor()); | 598 EXPECT_EQ(1.0f, GetCursorScaleFactor()); |
598 another.Enable(ui::GestureProviderConfigType::GENERIC_MOBILE); | 599 another.Enable(ui::GestureProviderConfigType::GENERIC_MOBILE); |
599 EXPECT_EQ(2.0f, GetCursorScaleFactor()); | 600 EXPECT_EQ(2.0f, GetCursorScaleFactor()); |
600 } | 601 } |
601 | 602 |
602 } // namespace content | 603 } // namespace content |
OLD | NEW |