2 <script src=
"../../resources/js-test.js"></script>
13 background-color: grey;
17 background-color: red;
21 <div id=
"outer" class=
"box">
22 <div id=
"inner" class=
"box"></div>
25 <div id=
"console"></div>
28 description("Verifies that mouse events are not fired on deleted nodes (crbug.com/515921)");
30 function eventLogger(event
) {
31 if (event
.eventPhase
== Event
.AT_TARGET
)
32 debug(event
.currentTarget
.id
+ " received " + event
.type
);
36 var outer
= document
.getElementById("outer");
37 var inner
= document
.getElementById("inner");
39 ["mouseenter", "mouseleave", "mouseover", "mouseout"].forEach(function(event
){
40 outer
.addEventListener(event
, eventLogger
);
41 inner
.addEventListener(event
, eventLogger
);
44 outer
.addEventListener("click", function () {
45 outer
.removeChild(inner
);
46 debug("removed inner");
51 if (window
.eventSender
) {
52 eventSender
.mouseMoveTo(30, 30);
53 eventSender
.mouseMoveTo(130, 130);
54 eventSender
.mouseDown();
55 eventSender
.mouseUp();
56 debug("TODO(crbug.com/276329): We are missing a mouseout here!")
57 debug("TODO(crbug.com/276329): We are missing a mouseleave here!")
58 eventSender
.mouseMoveTo(30, 30);
60 debug("This test requires eventSender");