4 <script src=
"../../resources/js-test.js"></script>
6 window
.jsTestIsAsync
= true;
8 document
.addEventListener('DOMContentLoaded', function () {
9 document
.body
.addEventListener('mouseenter', handleEvent
, true);
10 document
.body
.addEventListener('mouseleave', handleEvent
, true);
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);
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
);
66 background-color: green;
75 <div id=
"inner1"></div>
77 <div id=
"inner3"></div>