blob: 907a2b405e442ba09ae623327d6f7de5492d3a80 [file] [log] [blame]
Ori Avtalion44b91e92017-01-03 14:34:311<!doctype html>
2<meta charset=utf-8>
3<head>
4<title>CSSOM MouseEvent tests</title>
5<script src=/resources/testharness.js></script>
6<script src=/resources/testharnessreport.js></script>
7<script>
8test(function () {
9 var mouseEvent = new MouseEvent('mousedown', {clientX: 10, clientY: 20});
10 assert_equals(mouseEvent.x, 10);
11 assert_equals(mouseEvent.y, 20);
12 mouseEvent = new MouseEvent('mousedown', {clientX: 30, clientY: 40});
13 assert_equals(mouseEvent.x, 30);
14 assert_equals(mouseEvent.y, 40);
15}, 'MouseEvent\'s x and y must be equal to clientX and clientY.');
16</script>
17</head>