Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / inspector-protocol / timeline / timeline-timer.html
blobd0d4e2d2f8978b4a622d927ad2562f5d49a71829
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 performActions(callback)
9 var timerId = setTimeout(function()
11 evaluateInFrontend("InspectorTest.testFunctionTimerFired(" + timerId + ", " + timerId2 + ")");
12 callback();
13 }, 0);
15 var timerId2 = setTimeout(function() { }, 0);
16 clearTimeout(timerId2);
17 return timerId;
20 function test()
22 InspectorTest.invokeAsyncWithTracing("performActions", finish);
24 var firedTimerId;
25 var removedTimerId;
26 InspectorTest.testFunctionTimerFired = function(timerId1, timerId2)
28 firedTimerId = timerId1;
29 removedTimerId = timerId2;
30 InspectorTest.log("SUCCESS: testFunctionTimerFired");
33 function finish(devtoolsEvents)
35 function hasTimerId(id, e) { return e.args.data.timerId === id}
37 var installTimer1 = InspectorTest.findEvent("TimerInstall", "I", hasTimerId.bind(this, firedTimerId));
38 var installTimer2 = InspectorTest.findEvent("TimerInstall", "I", hasTimerId.bind(this, removedTimerId));
40 InspectorTest.log("TimerInstall has frame: " + !!installTimer1.args.data.frame);
41 InspectorTest.log("TimerInstall frames match: " + (installTimer1.args.data.frame === installTimer2.args.data.frame));
43 InspectorTest.findEvent("TimerRemove", "I", hasTimerId.bind(this, removedTimerId));
44 InspectorTest.findEvent("TimerFire", "X", hasTimerId.bind(this, firedTimerId));
46 InspectorTest.log("SUCCESS: found all expected events.");
47 InspectorTest.completeTest();
50 </script>
51 </head>
52 <body onLoad="runTest();">
53 <div id="myDiv">DIV</div>
54 </body>
55 </html>