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

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

Issue 2569273002: Add constructors to WebInputEvents and setters so we can work at cleaning up these public structs. (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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 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/Range.h" 5 #include "core/dom/Range.h"
6 #include "core/frame/FrameView.h" 6 #include "core/frame/FrameView.h"
7 #include "core/input/EventHandler.h" 7 #include "core/input/EventHandler.h"
8 #include "core/page/ChromeClient.h" 8 #include "core/page/ChromeClient.h"
9 #include "core/page/ContextMenuController.h" 9 #include "core/page/ContextMenuController.h"
10 #include "core/page/FocusController.h" 10 #include "core/page/FocusController.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 } 85 }
86 86
87 void LinkSelectionTestBase::emulateMouseClick(const IntPoint& clickPoint, 87 void LinkSelectionTestBase::emulateMouseClick(const IntPoint& clickPoint,
88 WebMouseEvent::Button button, 88 WebMouseEvent::Button button,
89 int modifiers, 89 int modifiers,
90 int count) { 90 int count) {
91 auto event = FrameTestHelpers::createMouseEvent( 91 auto event = FrameTestHelpers::createMouseEvent(
92 WebMouseEvent::MouseDown, button, clickPoint, modifiers); 92 WebMouseEvent::MouseDown, button, clickPoint, modifiers);
93 event.clickCount = count; 93 event.clickCount = count;
94 m_webView->handleInputEvent(event); 94 m_webView->handleInputEvent(event);
95 event.type = WebMouseEvent::MouseUp; 95 event.setType(WebMouseEvent::MouseUp);
96 m_webView->handleInputEvent(event); 96 m_webView->handleInputEvent(event);
97 } 97 }
98 98
99 void LinkSelectionTestBase::emulateMouseDown(const IntPoint& clickPoint, 99 void LinkSelectionTestBase::emulateMouseDown(const IntPoint& clickPoint,
100 WebMouseEvent::Button button, 100 WebMouseEvent::Button button,
101 int modifiers, 101 int modifiers,
102 int count) { 102 int count) {
103 auto event = FrameTestHelpers::createMouseEvent( 103 auto event = FrameTestHelpers::createMouseEvent(
104 WebMouseEvent::MouseDown, button, clickPoint, modifiers); 104 WebMouseEvent::MouseDown, button, clickPoint, modifiers);
105 event.clickCount = count; 105 event.clickCount = count;
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 checkMouseClicks(*element, false); 324 checkMouseClicks(*element, false);
325 } 325 }
326 326
327 { 327 {
328 SCOPED_TRACE("Text div, double click"); 328 SCOPED_TRACE("Text div, double click");
329 checkMouseClicks(*element, true); 329 checkMouseClicks(*element, true);
330 } 330 }
331 } 331 }
332 332
333 } // namespace blink 333 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698