f8882cfa8d826369d48b99f434de9767ae89f3e4
[WebKit-https.git] / LayoutTests / fast / events / mouseout-dead-node.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../js/resources/js-test-pre.js"></script>
5 </head>
6 <body>
7 <p id="description"></p>
8 <div id="test-container">
9 <div id=d0 style='border:2px solid red'>
10 <div onmouseout='testFailed("mouseout")'  onmouseover='document.getElementById("d0").innerHTML ="you should see PASS below"'>
11 <div onmouseout='testFailed("mouseout")'>
12 <span id=target1 onmouseout='testPassed("mouseout")' >
13 mouse over me
14 </span>
15 </div>
16 </div>
17 </div>
18 <div id=d1 style='border:2px solid blue'>
19 <div id=target2 onmouseout='testPassed("mouseout")'  onmouseover='document.getElementById("d1").innerHTML ="you should see PASS below"' >
20 mouse over me
21 </div>
22 </div>
23 </div>
24 <div id="console"></div>
25 <script>
26 description("Test that if node dies under mouse it receives mouseout event but that the event does not propagate.");
27
28 if (window.testRunner)
29     testRunner.dumpAsText();
30
31 if (window.eventSender) {
32     var el = document.getElementById('target1');
33     var x = el.offsetLeft+3;
34     var y = el.offsetTop+3;
35     eventSender.mouseMoveTo(x, y);
36     eventSender.mouseMoveTo(x+1, y+1);
37     el = document.getElementById('target2');
38     x = el.offsetLeft+3;
39     y = el.offsetTop+3;
40     eventSender.mouseMoveTo(x, y);
41     eventSender.mouseMoveTo(x+1, y+1);
42
43     var testContainer = document.getElementById("test-container");
44     if (testContainer)
45         document.body.removeChild(testContainer);
46 }
47 </script>
48 <script src="../../fast/js/resources/js-test-post.js"></script>
49 </body>
50 </html>