| 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/WebKeyboardEvent.h" |
| 16 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" | 17 #include "third_party/WebKit/public/platform/WebMouseWheelEvent.h" |
| 17 #include "ui/events/blink/web_input_event_traits.h" | 18 #include "ui/events/blink/web_input_event_traits.h" |
| 18 | 19 |
| 19 using blink::WebGestureEvent; | 20 using blink::WebGestureEvent; |
| 20 using blink::WebInputEvent; | 21 using blink::WebInputEvent; |
| 21 using blink::WebKeyboardEvent; | 22 using blink::WebKeyboardEvent; |
| 22 using blink::WebMouseEvent; | 23 using blink::WebMouseEvent; |
| 23 using blink::WebMouseWheelEvent; | 24 using blink::WebMouseWheelEvent; |
| 24 using blink::WebTouchEvent; | 25 using blink::WebTouchEvent; |
| 25 using blink::WebTouchPoint; | 26 using blink::WebTouchPoint; |
| (...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 emulator()->SetDeviceScaleFactor(1.0f); | 586 emulator()->SetDeviceScaleFactor(1.0f); |
| 586 EXPECT_EQ(1.0f, GetCursorScaleFactor()); | 587 EXPECT_EQ(1.0f, GetCursorScaleFactor()); |
| 587 | 588 |
| 588 TouchEmulator another(this, 4.0f); | 589 TouchEmulator another(this, 4.0f); |
| 589 EXPECT_EQ(1.0f, GetCursorScaleFactor()); | 590 EXPECT_EQ(1.0f, GetCursorScaleFactor()); |
| 590 another.Enable(ui::GestureProviderConfigType::GENERIC_MOBILE); | 591 another.Enable(ui::GestureProviderConfigType::GENERIC_MOBILE); |
| 591 EXPECT_EQ(2.0f, GetCursorScaleFactor()); | 592 EXPECT_EQ(2.0f, GetCursorScaleFactor()); |
| 592 } | 593 } |
| 593 | 594 |
| 594 } // namespace content | 595 } // namespace content |
| OLD | NEW |