Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / timeline / timeline-dispatchEvent.html
blob408512a456ea1c1f3ec5f95482fe1bed4c49537f
1 <html>
2 <head>
3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspector-protocol-test.js"></script>
4 <script type="text/javascript" src="../../http/tests/inspector-protocol/tracing-test.js"></script>
5 <script>
7 function performAction(callback)
9 var div = document.querySelector("#my-div");
10 div.addEventListener("click", function(e) { }, false);
11 div.click();
13 var iframe = document.createElement("iframe");
14 div.appendChild(iframe);
15 callback();
18 function test()
20 InspectorTest.invokeAsyncWithTracing("performAction", finish);
22 function finish(devtoolsEvents)
24 function windowEventFilter(type, e)
26 return e.name === "EventDispatch" && e.args.data.type === type;
29 var windowEventNames = [ "click", "beforeunload", "unload", "load" ];
30 for (var i = 0; i < windowEventNames.length; i++) {
31 var eventName = windowEventNames[i];
32 var events = devtoolsEvents.filter(windowEventFilter.bind(this, eventName));
33 if (events.length >= 1) {
34 InspectorTest.log("SUCCESS: found " + eventName + " event");
35 } else {
36 fail(eventName + " event is missing", devtoolsEvents);
40 InspectorTest.completeTest();
43 function fail(message, devtoolsEvents)
45 var formattedEvents = devtoolsEvents.map(function(e)
47 return e.name + (e.args.data ? "(" + e.args.data.type + ")" : "");
48 });
49 InspectorTest.log("FAIL: " + message + " devtools.timeline events: " + JSON.stringify(formattedEvents, null, 2));
52 </script>
53 </head>
54 <body onLoad="runTest();">
55 <div id="my-div"></div>
56 </body>
57 </html>