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

Unified Diff: LayoutTests/fast/forms/range/slider-zoomed.html

Issue 894913002: Prevent default actions for JS-generated mouse events other than click (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: TIL, gclient sync may rebase changes back in time Created 5 years, 6 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: LayoutTests/fast/forms/range/slider-zoomed.html
diff --git a/LayoutTests/fast/forms/range/slider-zoomed.html b/LayoutTests/fast/forms/range/slider-zoomed.html
index 23a36814cd7bcda4929ba939ba9a9a0b5ed99714..fc92ec4571376a2a8ac57dc98b0d25d6cb85578a 100644
--- a/LayoutTests/fast/forms/range/slider-zoomed.html
+++ b/LayoutTests/fast/forms/range/slider-zoomed.html
@@ -17,20 +17,13 @@
<script type="text/javascript" charset="utf-8">
if (window.testRunner)
testRunner.dumpAsText();
-
- function dispatchEvent(eventType, clientX, clientY)
- {
- var ev = document.createEvent("MouseEvent");
- ev.initMouseEvent(eventType, true, true, window, 1, 1, 1, clientX, clientY, false, false, false, false, 0, document);
- var target = document.elementFromPoint(ev.clientX, ev.clientY);
- target.dispatchEvent(ev);
- }
function test()
{
// For some reason the slider needs mouseup/mousedown, not just a "click"
- dispatchEvent("mousedown", 150, 15);
- dispatchEvent("mouseup", 150, 15);
+ eventSender.mouseMoveTo(150, 15);
+ eventSender.mouseDown(0);
+ eventSender.mouseUp(0);
const expectedValue = 72;
var val = document.getElementById('slider').value;
« no previous file with comments | « LayoutTests/fast/forms/range/slider-transformed.html ('k') | LayoutTests/fast/forms/select-list-box-mouse-focus.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698