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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/scroll-invalidations.html

Issue 2412023002: DevTools: migrate InspectorView to tabbed view location. (Closed)
Patch Set: made layers panel closeable. Created 4 years, 2 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() 7 function scrollAndDisplay()
8 { 8 {
9 scrollTo(0, 200); 9 scrollTo(0, 200);
10 if (window.testRunner) 10 if (window.testRunner)
11 return new Promise((fulfill) => testRunner.layoutAndPaintAsyncThen(fulfi ll)); 11 return new Promise((fulfill) => testRunner.layoutAndPaintAsyncThen(fulfi ll));
12 return Promise.reject(); 12 return Promise.reject();
13 } 13 }
14 14
15 function test() 15 function test()
16 { 16 {
17 var currentPanel = WebInspector.inspectorView.currentPanel();
18 InspectorTest.assertEquals(currentPanel._panelName, "timeline", "Current pan el should be the timeline.");
19 Runtime.experiments.enableForTest("timelineInvalidationTracking"); 17 Runtime.experiments.enableForTest("timelineInvalidationTracking");
20 18
21 InspectorTest.invokeAsyncWithTimeline("scrollAndDisplay", onRecordingDone); 19 InspectorTest.invokeAsyncWithTimeline("scrollAndDisplay", onRecordingDone);
22 20
23 function onRecordingDone() 21 function onRecordingDone()
24 { 22 {
25 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint); 23 var record = InspectorTest.findFirstTimelineRecord(WebInspector.Timeline Model.RecordType.Paint);
26 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "Scroll invalidations"); 24 InspectorTest.addArray(record._event.invalidationTrackingEvents, Inspect orTest.InvalidationFormatters, "", "Scroll invalidations");
27 InspectorTest.completeTest(); 25 InspectorTest.completeTest();
28 }; 26 };
29 } 27 }
30 </script> 28 </script>
31 </head> 29 </head>
32 <body onload="runTest()"> 30 <body onload="runTest()">
33 <p>Tests invalidations produced by scrolling a page with position: fixed element s.</p> 31 <p>Tests invalidations produced by scrolling a page with position: fixed element s.</p>
34 <div style="width: 400px; height: 2000px; background-color: grey"></div> 32 <div style="width: 400px; height: 2000px; background-color: grey"></div>
35 <div style="position: fixed; left: 50px; top: 100px; width: 50px; height: 50px; background-color: rgba(255, 100, 100, 0.6)"></div> 33 <div style="position: fixed; left: 50px; top: 100px; width: 50px; height: 50px; background-color: rgba(255, 100, 100, 0.6)"></div>
36 </body> 34 </body>
37 </html> 35 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698