4 <script src=
"../../resources/js-test.js"></script>
6 window
.jsTestIsAsync
= true;
8 document
.addEventListener('DOMContentLoaded', function () {
9 if (window
.testRunner
) {
10 eventSender
.mouseMoveTo(1, 1);
11 eventSender
.mouseMoveTo(90,140);
12 debug("// Entering #outer");
13 eventSender
.mouseMoveTo(110,140);
14 debug("// Entering #inner1");
15 eventSender
.mouseMoveTo(130,140);
16 debug("// Entering #inner3 (and therefore also #inner2)");
17 eventSender
.mouseMoveTo(170,140);
18 debug("// Leaving #inner3 and #inner2, but not #outer");
19 eventSender
.mouseMoveTo(180,140);
20 debug("// Leaving #outer");
21 eventSender
.mouseMoveTo(210,140);
27 function handleEvent(e
) {
28 var phases
= ['', 'capturing', 'at target', 'bubbling'];
29 var target
= e
.target
? e
.target
: e
.srcElement
;
30 if (target
.id
&& target
.id
!= "console") {
31 debug(e
.type
+ " (" + phases
[e
.eventPhase
] + ") on " + target
.id
);
32 if (e
.relatedTarget
&& e
.relatedTarget
.id
)
33 debug('- Related target: ' + e
.relatedTarget
.id
);
68 background-color: green;
76 <div id=
"outer" onmouseenter=
"handleEvent(event)" onmouseleave=
"handleEvent(event)" onmouseover=
"handleEvent(event)" onmouseout=
"handleEvent(event)">
77 <div id=
"inner1" onmouseenter=
"handleEvent(event)" onmouseleave=
"handleEvent(event)" onmouseover=
"handleEvent(event)" onmouseout=
"handleEvent(event)"></div>
78 <div id=
"inner2" onmouseenter=
"handleEvent(event)" onmouseleave=
"handleEvent(event)" onmouseover=
"handleEvent(event)" onmouseout=
"handleEvent(event)">
79 <div id=
"inner3" onmouseenter=
"handleEvent(event)" onmouseleave=
"handleEvent(event)" onmouseover=
"handleEvent(event)" onmouseout=
"handleEvent(event)"></div>