[SVG] Cached filter results are not invalidated on repaint rect change
[WebKit-https.git] / LayoutTests / fast / events / mouse-cursor-change.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 <style type="text/css">
6 </style>
7 </head>
8 <body>
9 <p id="description"></p>
10 <p><a href="https://bugs.webkit.org/show_bug.cgi?id=53341">Bug 53341</a></p>
11 <div id="test-container">
12     <div id="target" onMouseDown="style.cursor='progress';event.preventDefault();" onMouseMove="style.cursor='pointer';" onMouseUp="style.cursor='help';" style="cursor:pointer;">Play with mouse on this element. Cursors change on events - mousemove: pointer(hand), mousedown: progress, mouseup: help.</div>
13 </div>
14 <br/>
15 <div id="console"></div>
16 <script>
17 description("Test that mouse cursors are changed correctly on mouse events.");
18
19 if (!window.eventSender) {
20     testFailed('This test requires DumpRenderTree');
21 }
22
23 if (window.testRunner) {
24     testRunner.dumpAsText();
25     testRunner.waitUntilDone();
26     window.jsTestIsAsync = true;
27 }
28
29 function runTest(prepare, next) {
30     prepare();
31     setTimeout(function() {
32         debug('Cursor Info: ' + window.internals.getCurrentCursorInfo(document));
33         debug('');
34         next();
35     }, 0);
36 }
37
38 function testsDone() {
39     // This text is redundant with the test output - hide it
40     document.getElementById('test-container').style.display = 'none';
41     finishJSTest();
42 }
43
44 // Can't do anything useful here without eventSender
45 if (window.eventSender) {
46     var target = document.getElementById('target');
47     eventSender.dragMode = false;
48     var tests = [
49         function() {
50             debug('Mouse move');
51             eventSender.mouseMoveTo(target.offsetLeft + 3, target.offsetTop + 3);
52         }, function() {
53             debug('Mouse down');
54             eventSender.mouseDown();
55         }, function() {
56             debug('Mouse hold down, move');
57             eventSender.mouseMoveTo(target.offsetLeft + 13, target.offsetTop + 3);
58         }, function() {
59             debug('Mouse up');
60             eventSender.mouseUp();
61         }
62     ];
63
64     var i = 0;
65     function nextTest() {
66         if (i < tests.length) {
67             runTest(tests[i++], nextTest);
68         } else {
69             testsDone();
70         }
71     }
72     nextTest();
73 }
74
75 </script>
76 <script src="../../fast/js/resources/js-test-post.js"></script>
77 </body>
78 </html>