Initialize Tizen 2.3
[framework/web/webkit-efl.git] / LayoutTests / inspector / timeline / timeline-timer.html
1 <html>
2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script>
6
7 function performActions()
8 {
9     var timerOne = setTimeout("1 + 1", 10);
10     var timerTwo = setInterval(intervalTimerWork, 20);
11     var iteration = 0;
12
13     function intervalTimerWork()
14     {
15         if (++iteration < 2)
16             return;
17         clearInterval(timerTwo);
18     }
19 }
20
21 function test()
22 {
23     InspectorTest.startTimeline(function() {
24         InspectorTest.evaluateInPage("performActions()");
25     });
26
27     InspectorTest.waitForRecordType("TimerRemove", finish);
28
29     function finish()
30     {
31         InspectorTest.printTimelineRecords("TimerInstall");
32         InspectorTest.printTimelineRecords("TimerFire");
33         InspectorTest.printTimelineRecords("TimerRemove");
34         InspectorTest.printTimelineRecords("FunctionCall");
35         InspectorTest.printTimelineRecords("EvaluateScript");
36         InspectorTest.completeTest();
37     }
38 }
39
40 if (!window.testRunner)
41     setTimeout(performActions, 2000);
42
43 </script>
44 </head>
45
46 <body onload="runTest()">
47 <p>
48 Tests the Timeline events for Timers
49 </p>
50 </body>
51 </html>