4 <script src=
"../../http/tests/inspector/inspector-test.js"></script>
5 <script src=
"../../http/tests/inspector/timeline-test.js"></script>
7 function scrollAndDisplay(callback
)
10 if (window
.testRunner
)
11 testRunner
.layoutAndPaintAsyncThen(callback
);
16 var currentPanel
= WebInspector
.inspectorView
.currentPanel();
17 InspectorTest
.assertEquals(currentPanel
._panelName
, "timeline", "Current panel should be the timeline.");
18 Runtime
.experiments
.enableForTest("timelineInvalidationTracking");
20 InspectorTest
.invokeAsyncWithTimeline("scrollAndDisplay", onRecordingDone
);
22 function onRecordingDone()
24 var record
= InspectorTest
.findFirstTimelineRecord(WebInspector
.TimelineModel
.RecordType
.Paint
);
25 InspectorTest
.addArray(record
._event
.invalidationTrackingEvents
, InspectorTest
.InvalidationFormatters
, "", "Scroll invalidations");
26 InspectorTest
.completeTest();
31 <body onload=
"runTest()">
32 <p>Tests invalidations produced by scrolling a page with position: fixed elements.
</p>
33 <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>