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 "config.h" | 5 #include "config.h" |
6 | 6 |
7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
8 #include "core/dom/Element.h" | 8 #include "core/dom/Element.h" |
9 #include "core/dom/Node.h" | 9 #include "core/dom/Node.h" |
10 #include "core/html/HTMLElement.h" | 10 #include "core/html/HTMLElement.h" |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
70 | 70 |
71 std::string m_baseURL; | 71 std::string m_baseURL; |
72 FrameTestHelpers::WebViewHelper m_webViewHelper; | 72 FrameTestHelpers::WebViewHelper m_webViewHelper; |
73 RefPtrWillBePersistent<Document> m_document; | 73 RefPtrWillBePersistent<Document> m_document; |
74 }; | 74 }; |
75 | 75 |
76 void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint) | 76 void ImeOnFocusTest::sendGestureTap(WebView* webView, IntPoint clientPoint) |
77 { | 77 { |
78 WebGestureEvent webGestureEvent; | 78 WebGestureEvent webGestureEvent; |
79 webGestureEvent.type = WebInputEvent::GestureTap; | 79 webGestureEvent.type = WebInputEvent::GestureTap; |
80 webGestureEvent.sourceDevice = WebGestureDeviceTouchpad; | |
tdresser
2015/10/19 12:52:39
Let's make this touchscreen.
wjmaclean
2015/10/19 15:26:55
Done.
| |
80 webGestureEvent.x = clientPoint.x(); | 81 webGestureEvent.x = clientPoint.x(); |
81 webGestureEvent.y = clientPoint.y(); | 82 webGestureEvent.y = clientPoint.y(); |
82 webGestureEvent.globalX = clientPoint.x(); | 83 webGestureEvent.globalX = clientPoint.x(); |
83 webGestureEvent.globalY = clientPoint.y(); | 84 webGestureEvent.globalY = clientPoint.y(); |
84 webGestureEvent.data.tap.tapCount = 1; | 85 webGestureEvent.data.tap.tapCount = 1; |
85 webGestureEvent.data.tap.width = 10; | 86 webGestureEvent.data.tap.width = 10; |
86 webGestureEvent.data.tap.height = 10; | 87 webGestureEvent.data.tap.height = 10; |
87 | 88 |
88 webView->handleInputEvent(webGestureEvent); | 89 webView->handleInputEvent(webGestureEvent); |
89 runPendingTasks(); | 90 runPendingTasks(); |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
147 { | 148 { |
148 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input"); | 149 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input"); |
149 } | 150 } |
150 | 151 |
151 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) | 152 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) |
152 { | 153 { |
153 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html"); | 154 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html"); |
154 } | 155 } |
155 | 156 |
156 } // namespace blink | 157 } // namespace blink |
OLD | NEW |