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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/timeline-time/timeline-timer-fired-from-eval-call-site.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 performActions(callback) 7 function performActions()
8 { 8 {
9 window.callWhenDone = callback; 9 var promise = new Promise((fulfill) => window.callWhenDone = fulfill);
10 var content = "" + 10 var content = "" +
11 "var fn2 = function() {" + 11 "var fn2 = function() {" +
12 " console.markTimeline(\"Script evaluated\");" + 12 " console.markTimeline(\"Script evaluated\");" +
13 " window.callWhenDone();" + 13 " window.callWhenDone();" +
14 "};\\n" + 14 "};\\n" +
15 "var fn1 = function() {" + 15 "var fn1 = function() {" +
16 " window.setTimeout(fn2, 1);" + 16 " window.setTimeout(fn2, 1);" +
17 "};\\n" + 17 "};\\n" +
18 "window.setTimeout(fn1, 1);\\n" + 18 "window.setTimeout(fn1, 1);\\n" +
19 "//# sourceURL=fromEval.js"; 19 "//# sourceURL=fromEval.js";
20 content = "eval('" + content + "');"; 20 content = "eval('" + content + "');";
21 var scriptElement = document.createElement('script'); 21 var scriptElement = document.createElement('script');
22 var contentNode = document.createTextNode(content); 22 var contentNode = document.createTextNode(content);
23 scriptElement.appendChild(contentNode); 23 scriptElement.appendChild(contentNode);
24 document.body.appendChild(scriptElement); 24 document.body.appendChild(scriptElement);
25 document.body.removeChild(scriptElement); 25 document.body.removeChild(scriptElement);
26 return promise;
26 } 27 }
27 28
28 function test() 29 function test()
29 { 30 {
30 InspectorTest.invokeAsyncWithTimeline("performActions", finish); 31 InspectorTest.invokeAsyncWithTimeline("performActions", finish);
31 32
32 function finish() 33 function finish()
33 { 34 {
34 function formatter(record) 35 function formatter(record)
35 { 36 {
(...skipping 13 matching lines...) Expand all
49 </script> 50 </script>
50 </head> 51 </head>
51 52
52 <body onload="runTest()"> 53 <body onload="runTest()">
53 <p> 54 <p>
54 Tests the Timeline API instrumentation of a TimerFired events inside evaluated s cripts. 55 Tests the Timeline API instrumentation of a TimerFired events inside evaluated s cripts.
55 </p> 56 </p>
56 57
57 </body> 58 </body>
58 </html> 59 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698