Rubber-stamped by Brady Eidson.
[webbrowser.git] / LayoutTests / inspector / timeline-event-dispatch.html
blobee32a5482451caaa19276fefc3928b499c0acabb
1 <html>
2 <head>
3 <script src="inspector-test.js"></script>
4 <script src="timeline-test.js"></script>
5 <script>
7 function handleMouseDown(event)
9 console.markTimeline("Handling mousedown");
12 function doit()
14 if (window.layoutTestController)
15 layoutTestController.setTimelineProfilingEnabled(true);
17 var target = document.getElementById("testTarget");
18 target.addEventListener("mousedown", handleMouseDown, true);
20 // Simulate the mouse down over the target to trigger an EventDispatch
21 if (window.eventSender) {
22 window.eventSender.mouseMoveTo(200, 300);
23 window.eventSender.mouseDown();
26 setTimeout(function() {
27 printTimelineRecords(null, "EventDispatch");
28 }, 0);
31 </script>
32 </head>
34 <body onload="onload()">
35 <p>
36 Tests the Timeline API instrumentation of a DOM Dispatch (mousedown)
37 </p>
39 <div id="testTarget" style="width:400px; height:400px;">
40 Test Mouse Target
41 </div>
43 </body>
44 </html>