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

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: Make compilers happy. 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 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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698