OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <script src="../js/resources/js-test-pre.js"></script> |
| 5 <script> |
| 6 window.jsTestIsAsync = true; |
| 7 |
| 8 document.addEventListener('DOMContentLoaded', function () { |
| 9 document.body.addEventListener('mouseenter', handleEvent, true); |
| 10 document.body.addEventListener('mouseleave', handleEvent, true); |
| 11 |
| 12 if (window.testRunner) { |
| 13 eventSender.mouseMoveTo(1, 1); |
| 14 eventSender.mouseMoveTo(90,140); |
| 15 debug("// Entering #outer"); |
| 16 eventSender.mouseMoveTo(110,140); |
| 17 debug("// Entering #inner1"); |
| 18 eventSender.mouseMoveTo(130,140); |
| 19 debug("// Entering #inner3 (and therefore also #inner2)"); |
| 20 eventSender.mouseMoveTo(170,140); |
| 21 debug("// Leaving #inner3 and #inner2, but not #outer"); |
| 22 eventSender.mouseMoveTo(180,140); |
| 23 debug("// Leaving #outer"); |
| 24 eventSender.mouseMoveTo(210,140); |
| 25 } |
| 26 |
| 27 finishJSTest(); |
| 28 }); |
| 29 |
| 30 function handleEvent(e) { |
| 31 var target = e.target ? e.target : e.srcElement; |
| 32 if (target.id && target.id != "console") |
| 33 debug(e.type + " on " + target.id); |
| 34 } |
| 35 </script> |
| 36 <script src="../js/resources/js-test-post.js"></script> |
| 37 |
| 38 <style> |
| 39 #outer { |
| 40 background: blue; |
| 41 height: 100px; |
| 42 left: 100px; |
| 43 position: absolute; |
| 44 top: 100px; |
| 45 width: 100px; |
| 46 } |
| 47 |
| 48 #inner1 { |
| 49 background: red; |
| 50 height: 50px; |
| 51 left: 20px; |
| 52 position: absolute; |
| 53 top: 20px; |
| 54 width: 50px; |
| 55 } |
| 56 |
| 57 #inner2 { |
| 58 background: yellow; |
| 59 height: 20px; |
| 60 left: 60px; |
| 61 position: absolute; |
| 62 top: 30px; |
| 63 width: 20px; |
| 64 } |
| 65 |
| 66 #inner3 { |
| 67 background-color: green; |
| 68 height: 10px; |
| 69 margin: 5px; |
| 70 width: 10px; |
| 71 } |
| 72 </style> |
| 73 </head> |
| 74 <body> |
| 75 <div id="outer"> |
| 76 <div id="inner1"></div> |
| 77 <div id="inner2"> |
| 78 <div id="inner3"></div> |
| 79 </div> |
| 80 </div> |
| 81 </body> |
| 82 </html> |
OLD | NEW |