1 description("This tests if mouse events are dispatched on an element obscured by a pseudo-element.");
3 var div = document.createElement("div");
8 function appendEventLog() {
9 if (window.eventSender)
10 eventLog += event.type + " ";
15 function clearEventLog() {
19 div.addEventListener("click", appendEventLog, false);
20 div.addEventListener("dblclick", appendEventLog, false);
21 div.addEventListener("mousedown", appendEventLog, false);
22 div.addEventListener("mouseup", appendEventLog, false);
24 document.body.insertBefore(div, document.body.firstChild);
26 function sendEvents(button) {
29 function testEvents(description, button, expectedString) {
34 if (!window.eventSender) {
35 debug("This test requires DumpRenderTree. Click on the gray rect with left mouse button to log.")
38 eventSender.mouseMoveTo(10, 10);
39 eventSender.mouseDown(button);
40 eventSender.mouseUp(button);
41 eventSender.mouseDown(button);
42 eventSender.mouseUp(button);
43 shouldBeEqualToString("eventLog", "mousedown mouseup click mousedown mouseup click dblclick ");