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

Unified Diff: third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp

Issue 2650403006: Remove PlatformMouseEvent and use WebMouseEvent instead (Closed)
Patch Set: Fix nits 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp b/third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp
index 94435af81d3443ba67422aed77ce9d86f25087e1..ae1100cbf14db03c44ddc3f6fad793ae77ec3d9d 100644
--- a/third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp
+++ b/third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp
@@ -76,11 +76,15 @@ TEST_F(ContextMenuControllerTest, TestCustomMenu) {
"</menu>"
"</button>");
+ MouseEventInit mouseInitializer;
+ mouseInitializer.setView(document().domWindow());
+ mouseInitializer.setScreenX(50);
+ mouseInitializer.setScreenY(50);
+ mouseInitializer.setButton(1);
+
// Create right button click event and pass it to context menu controller.
- Event* event = MouseEvent::create(
- EventTypeNames::click, false, false, document().domWindow(), 50, 50, 0, 0,
- 0, 0, 0, PlatformEvent::NoModifiers, 1, 0, nullptr, TimeTicks(),
- PlatformMouseEvent::RealOrIndistinguishable, String(), nullptr);
+ Event* event =
+ MouseEvent::create(nullptr, EventTypeNames::click, mouseInitializer);
document().getElementById("button_id")->focus();
event->setTarget(document().getElementById("button_id"));
document().page()->contextMenuController().handleContextMenuEvent(event);
« no previous file with comments | « third_party/WebKit/Source/core/page/AutoscrollController.cpp ('k') | third_party/WebKit/Source/core/page/DragController.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698