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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-js/timeline-script-id.html

Issue 2208963002: [DevTools] Removed InspectorTest.invokeFunctionInPageAsync (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove-promise-from-other-tests
Patch Set: a Created 4 years, 4 months 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 test() 7 function test()
8 { 8 {
9 function performActions(callback) 9 function performActions()
10 { 10 {
11 var callback;
12 var promise = new Promise((fulfill) => callback = fulfill);
11 var timerOne = setTimeout("1 + 1", 10); 13 var timerOne = setTimeout("1 + 1", 10);
12 var timerTwo = setInterval(intervalTimerWork, 20); 14 var timerTwo = setInterval(intervalTimerWork, 20);
13 var iteration = 0; 15 var iteration = 0;
16 return promise;
14 17
15 function intervalTimerWork() 18 function intervalTimerWork()
16 { 19 {
17 if (++iteration < 2) 20 if (++iteration < 2)
18 return; 21 return;
19 clearInterval(timerTwo); 22 clearInterval(timerTwo);
20 callback(); 23 callback();
21 } 24 }
22 } 25 }
23 26
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 </head> 64 </head>
62 65
63 <body onload="runTest()"> 66 <body onload="runTest()">
64 <p> 67 <p>
65 Test that checks location resolving mechanics for TimerInstall TimerRemove and F unctionCall events with scriptId. 68 Test that checks location resolving mechanics for TimerInstall TimerRemove and F unctionCall events with scriptId.
66 </p><p> 69 </p><p>
67 It expects two FunctionCall for InjectedScript, two TimerInstall events, two Fun ctionCall events and one TimerRemove event to be logged with performActions.js s cript name and some line number. 70 It expects two FunctionCall for InjectedScript, two TimerInstall events, two Fun ctionCall events and one TimerRemove event to be logged with performActions.js s cript name and some line number.
68 </p> 71 </p>
69 </body> 72 </body>
70 </html> 73 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698