Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(293)

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-time/timeline-timer.html

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 6
7 function performActions() 7 function performActions()
8 { 8 {
9 var callback; 9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill); 10 var promise = new Promise((fulfill) => callback = fulfill);
11 var timerOne = setTimeout("1 + 1", 10); 11 var timerOne = setTimeout("1 + 1", 10);
12 var timerTwo = setInterval(intervalTimerWork, 20); 12 var timerTwo = setInterval(intervalTimerWork, 20);
13 var iteration = 0; 13 var iteration = 0;
14 14
15 function intervalTimerWork() 15 function intervalTimerWork()
16 { 16 {
17 if (++iteration < 2) 17 if (++iteration < 2)
18 return; 18 return;
19 clearInterval(timerTwo); 19 clearInterval(timerTwo);
20 callback(); 20 callback();
21 } 21 }
22 return promise; 22 return promise;
23 } 23 }
24 24
25 function test() 25 function test()
26 { 26 {
27 WebInspector.panels.timeline._captureJSProfileSetting.set(false); 27 UI.panels.timeline._captureJSProfileSetting.set(false);
28 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 28 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
29 29
30 function finish() 30 function finish()
31 { 31 {
32 InspectorTest.printTimelineRecordsWithDetails("TimerInstall"); 32 InspectorTest.printTimelineRecordsWithDetails("TimerInstall");
33 InspectorTest.printTimelineRecordsWithDetails("TimerFire"); 33 InspectorTest.printTimelineRecordsWithDetails("TimerFire");
34 InspectorTest.printTimelineRecordsWithDetails("TimerRemove"); 34 InspectorTest.printTimelineRecordsWithDetails("TimerRemove");
35 InspectorTest.printTimelineRecords("FunctionCall"); 35 InspectorTest.printTimelineRecords("FunctionCall");
36 InspectorTest.printTimelineRecordsWithDetails("EvaluateScript"); 36 InspectorTest.printTimelineRecordsWithDetails("EvaluateScript");
37 InspectorTest.completeTest(); 37 InspectorTest.completeTest();
38 } 38 }
39 } 39 }
40 40
41 if (!window.testRunner) 41 if (!window.testRunner)
42 setTimeout(performActions, 2000); 42 setTimeout(performActions, 2000);
43 43
44 </script> 44 </script>
45 </head> 45 </head>
46 46
47 <body onload="runTest()"> 47 <body onload="runTest()">
48 <p> 48 <p>
49 Tests the Timeline events for Timers 49 Tests the Timeline events for Timers
50 </p> 50 </p>
51 </body> 51 </body>
52 </html> 52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698