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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector-protocol/timeline/timeline-timer.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 type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script> 3 <script type="text/javascript" src="../../http/tests/inspector-protocol/inspecto r-protocol-test.js"></script>
4 <script type="text/javascript" src="../../http/tests/inspector-protocol/tracing- test.js"></script> 4 <script type="text/javascript" src="../../http/tests/inspector-protocol/tracing- test.js"></script>
5 <script> 5 <script>
6 6
7 function performActions(callback) 7 function performActions()
8 { 8 {
9 var callback;
10 var promise = new Promise((fulfill) => callback = fulfill);
9 var timerId = setTimeout(function() 11 var timerId = setTimeout(function()
10 { 12 {
11 evaluateInFrontend("InspectorTest.testFunctionTimerFired(" + timerId + " , " + timerId2 + ")"); 13 evaluateInFrontend("InspectorTest.testFunctionTimerFired(" + timerId + " , " + timerId2 + ")");
12 callback(); 14 callback();
13 }, 0); 15 }, 0);
14 16
15 var timerId2 = setTimeout(function() { }, 0); 17 var timerId2 = setTimeout(function() { }, 0);
16 clearTimeout(timerId2); 18 clearTimeout(timerId2);
17 return timerId; 19 return promise;
18 } 20 }
19 21
20 function test() 22 function test()
21 { 23 {
22 InspectorTest.invokeAsyncWithTracing("performActions", finish); 24 InspectorTest.invokeAsyncWithTracing("performActions", finish);
23 25
24 var firedTimerId; 26 var firedTimerId;
25 var removedTimerId; 27 var removedTimerId;
26 InspectorTest.testFunctionTimerFired = function(timerId1, timerId2) 28 InspectorTest.testFunctionTimerFired = function(timerId1, timerId2)
27 { 29 {
(...skipping 18 matching lines...) Expand all
46 InspectorTest.log("SUCCESS: found all expected events."); 48 InspectorTest.log("SUCCESS: found all expected events.");
47 InspectorTest.completeTest(); 49 InspectorTest.completeTest();
48 } 50 }
49 } 51 }
50 </script> 52 </script>
51 </head> 53 </head>
52 <body onLoad="runTest();"> 54 <body onLoad="runTest();">
53 <div id="myDiv">DIV</div> 55 <div id="myDiv">DIV</div>
54 </body> 56 </body>
55 </html> 57 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698