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

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

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase Created 3 years, 11 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 "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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 // GestureTap is only ever from touch screens. 69 // GestureTap is only ever from touch screens.
70 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen; 70 webGestureEvent.sourceDevice = WebGestureDeviceTouchscreen;
71 webGestureEvent.x = clientPoint.x(); 71 webGestureEvent.x = clientPoint.x();
72 webGestureEvent.y = clientPoint.y(); 72 webGestureEvent.y = clientPoint.y();
73 webGestureEvent.globalX = clientPoint.x(); 73 webGestureEvent.globalX = clientPoint.x();
74 webGestureEvent.globalY = clientPoint.y(); 74 webGestureEvent.globalY = clientPoint.y();
75 webGestureEvent.data.tap.tapCount = 1; 75 webGestureEvent.data.tap.tapCount = 1;
76 webGestureEvent.data.tap.width = 10; 76 webGestureEvent.data.tap.width = 10;
77 webGestureEvent.data.tap.height = 10; 77 webGestureEvent.data.tap.height = 10;
78 78
79 webView->handleInputEvent(webGestureEvent); 79 webView->handleInputEvent(WebCoalescedInputEvent(webGestureEvent));
80 runPendingTasks(); 80 runPendingTasks();
81 } 81 }
82 82
83 void ImeOnFocusTest::focus(const AtomicString& element) { 83 void ImeOnFocusTest::focus(const AtomicString& element) {
84 m_document->body()->getElementById(element)->focus(); 84 m_document->body()->getElementById(element)->focus();
85 } 85 }
86 86
87 void ImeOnFocusTest::runImeOnFocusTest(std::string fileName, 87 void ImeOnFocusTest::runImeOnFocusTest(std::string fileName,
88 int expectedVirtualKeyboardRequestCount, 88 int expectedVirtualKeyboardRequestCount,
89 IntPoint tapPoint, 89 IntPoint tapPoint,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1, 141 runImeOnFocusTest("ime-on-focus-after-navigation-within-page.html", 1,
142 IntPoint(50, 50), "input"); 142 IntPoint(50, 50), "input");
143 } 143 }
144 144
145 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) { 145 TEST_F(ImeOnFocusTest, AfterFrameLoadOnGesture) {
146 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1, 146 runImeOnFocusTest("ime-on-focus-after-frame-load-on-gesture.html", 1,
147 IntPoint(50, 50), "input", "frame.html"); 147 IntPoint(50, 50), "input", "frame.html");
148 } 148 }
149 149
150 } // namespace blink 150 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/BrowserControlsTest.cpp ('k') | third_party/WebKit/Source/web/tests/LinkSelectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698