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

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

Issue 1184693003: Revert 196987 "Don't invoke default actions for MouseEvents gene..." (Closed) Base URL: svn://svn.chromium.org/blink/
Patch Set: 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: trunk/LayoutTests/fast/forms/range/slider-transformed.html
===================================================================
--- trunk/LayoutTests/fast/forms/range/slider-transformed.html (revision 197019)
+++ trunk/LayoutTests/fast/forms/range/slider-transformed.html (working copy)
@@ -16,15 +16,21 @@
<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"
- eventSender.mouseMoveTo(61, 71);
- eventSender.mouseDown(0);
- eventSender.mouseUp(0);
+ dispatchEvent("mousedown", 61, 71);
+ dispatchEvent("mouseup", 61, 71);
-
const expectedValue = 39;
var val = document.getElementById('slider').value;
var result;
« no previous file with comments | « trunk/LayoutTests/fast/forms/listbox-onchange.html ('k') | trunk/LayoutTests/fast/forms/range/slider-zoomed.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698