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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/scroll-invalidations.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 <!DOCTYPE HTML> 1 <!DOCTYPE HTML>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../http/tests/inspector/inspector-test.js"></script> 4 <script src="../../http/tests/inspector/inspector-test.js"></script>
5 <script src="../../http/tests/inspector/timeline-test.js"></script> 5 <script src="../../http/tests/inspector/timeline-test.js"></script>
6 <script> 6 <script>
7 function scrollAndDisplay(callback) 7 function scrollAndDisplay()
8 { 8 {
9 scrollTo(0, 200); 9 scrollTo(0, 200);
10 if (window.testRunner) 10 if (window.testRunner)
11 testRunner.layoutAndPaintAsyncThen(callback); 11 return new Promise((fulfill) => testRunner.layoutAndPaintAsyncThen(fulfi ll));
12 return Promise.reject();
12 } 13 }
13 14
14 function test() 15 function test()
15 { 16 {
16 var currentPanel = WebInspector.inspectorView.currentPanel(); 17 var currentPanel = WebInspector.inspectorView.currentPanel();
17 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline."); 18 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline.");
18 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 19 Runtime.experiments.enableForTest("timelineInvalidationTracking");
19 20
20 InspectorTest.invokeAsyncWithTimeline("scrollAndDisplay", onRecordingDone); 21 InspectorTest.invokeAsyncWithTimeline("scrollAndDisplay", onRecordingDone);
21 22
22 function onRecordingDone() 23 function onRecordingDone()
23 { 24 {
24 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint); 25 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint);
25 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "Scroll invalidations"); 26 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "Scroll invalidations");
26 InspectorTest.completeTest(); 27 InspectorTest.completeTest();
27 }; 28 };
28 } 29 }
29 </script> 30 </script>
30 </head> 31 </head>
31 <body onload="runTest()"> 32 <body onload="runTest()">
32 <p>Tests invalidations produced by scrolling a page with position: fixed element s.</p> 33 <p>Tests invalidations produced by scrolling a page with position: fixed element s.</p>
33 <div style="width: 400px; height: 2000px; background-color: grey"></div> 34 <div style="width: 400px; height: 2000px; background-color: grey"></div>
34 <div style="position: fixed; left: 50px; top: 100px; width: 50px; height: 50px; background-color: rgba(255, 100, 100, 0.6)"></div> 35 <div style="position: fixed; left: 50px; top: 100px; width: 50px; height: 50px; background-color: rgba(255, 100, 100, 0.6)"></div>
35 </body> 36 </body>
36 </html> 37 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698