Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: third_party/WebKit/Source/web/tests/ImeOnFocusTest.cpp

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert more tests (related to CL) to use Touchscreen. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 // GestureTap is only ever from touch screens.
81 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen;
80 webGestureEvent.x = clientPoint.x(); 82 webGestureEvent.x = clientPoint.x();
81 webGestureEvent.y = clientPoint.y(); 83 webGestureEvent.y = clientPoint.y();
82 webGestureEvent.globalX = clientPoint.x(); 84 webGestureEvent.globalX = clientPoint.x();
83 webGestureEvent.globalY = clientPoint.y(); 85 webGestureEvent.globalY = clientPoint.y();
84 webGestureEvent.data.tap.tapCount = 1; 86 webGestureEvent.data.tap.tapCount = 1;
85 webGestureEvent.data.tap.width = 10; 87 webGestureEvent.data.tap.width = 10;
86 webGestureEvent.data.tap.height = 10; 88 webGestureEvent.data.tap.height = 10;
87 89
88 webView->handleInputEvent(webGestureEvent); 90 webView->handleInputEvent(webGestureEvent);
89 runPendingTasks(); 91 runPendingTasks();
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 { 149 {
148 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input"); 150 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, IntPo int(50, 50), "input");
149 } 151 }
150 152
151 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) 153 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture)
152 { 154 {
153 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html"); 155 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, IntPoi nt(50, 50), "input", "frame.html");
154 } 156 }
155 157
156 } // namespace blink 158 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | third_party/WebKit/Source/web/tests/TopControlsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698