| <!doctype html> | |
| <meta charset=utf-8> | |
| <head> | |
| <title>CSSOM MouseEvent tests</title> | |
| <script src=/resources/testharness.js></script> | |
| <script src=/resources/testharnessreport.js></script> | |
| <script> | |
| test(function () { | |
| var mouseEvent = new MouseEvent('mousedown', {clientX: 10, clientY: 20}); | |
| assert_equals(mouseEvent.x, 10); | |
| assert_equals(mouseEvent.y, 20); | |
| mouseEvent = new MouseEvent('mousedown', {clientX: 30, clientY: 40}); | |
| assert_equals(mouseEvent.x, 30); | |
| assert_equals(mouseEvent.y, 40); | |
| }, 'MouseEvent\'s x and y must be equal to clientX and clientY.'); | |
| </script> | |
| </head> |