| 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 "core/dom/Document.h" | 5 #include "core/dom/Document.h" |
| 6 #include "core/dom/Element.h" | 6 #include "core/dom/Element.h" |
| 7 #include "core/dom/Node.h" | 7 #include "core/dom/Node.h" |
| 8 #include "core/html/HTMLElement.h" | 8 #include "core/html/HTMLElement.h" |
| 9 #include "platform/testing/URLTestHelpers.h" | 9 #include "platform/testing/URLTestHelpers.h" |
| 10 #include "platform/testing/UnitTestHelpers.h" | 10 #include "platform/testing/UnitTestHelpers.h" |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 IntPoint tapPoint = IntPoint(-1, -1), | 56 IntPoint tapPoint = IntPoint(-1, -1), |
| 57 const AtomicString& focusElement = nullAtom, | 57 const AtomicString& focusElement = nullAtom, |
| 58 std::string frame = ""); | 58 std::string frame = ""); |
| 59 | 59 |
| 60 std::string m_baseURL; | 60 std::string m_baseURL; |
| 61 FrameTestHelpers::WebViewHelper m_webViewHelper; | 61 FrameTestHelpers::WebViewHelper m_webViewHelper; |
| 62 Persistent<Document> m_document; | 62 Persistent<Document> m_document; |
| 63 }; | 63 }; |
| 64 | 64 |
| 65 void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint) { | 65 void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint) { |
| 66 WebGestureEvent webGestureEvent; | 66 WebGestureEvent webGestureEvent(WebInputEvent::GestureTap, |
| 67 webGestureEvent.type = WebInputEvent::GestureTap; | 67 WebInputEvent::NoModifiers, |
| 68 WebInputEvent::TimeStampForTesting); |
| 68 // GestureTap is only ever from touch screens. | 69 // GestureTap is only ever from touch screens. |
| 69 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; | 70 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; |
| 70 webGestureEvent.x = clientPoint.x(); | 71 webGestureEvent.x = clientPoint.x(); |
| 71 webGestureEvent.y = clientPoint.y(); | 72 webGestureEvent.y = clientPoint.y(); |
| 72 webGestureEvent.globalX = clientPoint.x(); | 73 webGestureEvent.globalX = clientPoint.x(); |
| 73 webGestureEvent.globalY = clientPoint.y(); | 74 webGestureEvent.globalY = clientPoint.y(); |
| 74 webGestureEvent.data.tap.tapCount = 1; | 75 webGestureEvent.data.tap.tapCount = 1; |
| 75 webGestureEvent.data.tap.width = 10; | 76 webGestureEvent.data.tap.width = 10; |
| 76 webGestureEvent.data.tap.height = 10; | 77 webGestureEvent.data.tap.height = 10; |
| 77 | 78 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, | 140 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, |
| 140 IntPoint(50, 50), "input"); | 141 IntPoint(50, 50), "input"); |
| 141 } | 142 } |
| 142 | 143 |
| 143 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) { | 144 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) { |
| 144 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, | 145 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, |
| 145 IntPoint(50, 50), "input", "frame.html"); | 146 IntPoint(50, 50), "input", "frame.html"); |
| 146 } | 147 } |
| 147 | 148 |
| 148 } // namespace blink | 149 } // namespace blink |
| OLD | NEW |