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

Side by Side Diff: third_party/WebKit/LayoutTests/virtual/threaded/inspector/tracing/idle-callback.html

Issue 2964563002: Removing --disable/enable-threaded-compositing cmdline switches.
Patch Set: Created 3 years, 5 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
(Empty)
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 function performActions(idleWarningAddOn)
7 {
8 var callback;
9 var promise = new Promise((fulfill) => callback = fulfill);
10 var requestId = window.requestIdleCallback(idleCallback);
11 window.cancelIdleCallback(requestId);
12 window.requestIdleCallback(idleCallback);
13 function idleCallback()
14 {
15 window.requestIdleCallback(slowIdleCallback);
16 }
17 function slowIdleCallback(deadline)
18 {
19 while (deadline.timeRemaining()) {};
20 var addOnDeadline = performance.now() + idleWarningAddOn;
21 while (performance.now() < addOnDeadline) {};
22 if (callback)
23 callback();
24 }
25 return promise;
26 }
27
28 function test()
29 {
30 InspectorTest.invokeAsyncWithTimeline(`(() => performActions(${TimelineModel .TimelineModel.Thresholds.IdleCallbackAddon}))`, finish);
31
32 function finish()
33 {
34 InspectorTest.printTimelineRecordsWithDetails("RequestIdleCallback");
35 InspectorTest.printTimelineRecordsWithDetails("CancelIdleCallback");
36 InspectorTest.printTimelineRecordsWithDetails("FireIdleCallback");
37 InspectorTest.completeTest();
38 }
39 }
40
41 if (!window.testRunner)
42 setTimeout(performActions, 2000);
43 </script>
44 </head>
45
46 <body onload="runTest()">
47 <p>
48 Tests Timeline events emitted when idle callback is scheduled and fired.
49 </p>
50
51 </body>
52 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698