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

Unified Diff: LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations.html

Issue 674963003: Clean up the individual invalidation tests to be self contained. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations-on-deleted-node.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations.html
diff --git a/LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations.html b/LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations.html
index 281df23bdd05778eb3bdb2a9dcb417054171812b..8ef54f145fd2075adaf0522c13758cfe2a62481c 100644
--- a/LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations.html
+++ b/LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations.html
@@ -45,30 +45,34 @@ function test()
InspectorTest.assertEquals(invalidations[2].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
InspectorTest.assertEquals(invalidations[2].nodeName, "DIV id='testElement'");
InspectorTest.assertGreaterOrEqual(invalidations[2].stackTrace.length, 1);
- InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", next);
+
+ next();
});
},
function testSubframe(next)
{
- // The first paint corresponds to the local frame and should have no invalidations.
- var firstPaintRecord = InspectorTest.findFirstTimelineRecord(WebInspector.TimelineModel.RecordType.Paint);
- var firstInvalidations = firstPaintRecord._event.invalidationTrackingEvents;
- InspectorTest.assertEquals(firstInvalidations, undefined);
+ InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", function() {
+ // The first paint corresponds to the local frame and should have no invalidations.
+ var firstPaintRecord = InspectorTest.findFirstTimelineRecord(WebInspector.TimelineModel.RecordType.Paint);
+ var firstInvalidations = firstPaintRecord._event.invalidationTrackingEvents;
+ InspectorTest.assertEquals(firstInvalidations, undefined);
+
+ // The second paint corresponds to the subframe and should have our layout/style invalidations.
+ var secondPaintRecord = InspectorTest.findTimelineRecord(WebInspector.TimelineModel.RecordType.Paint, 1);
+ var secondInvalidations = secondPaintRecord._event.invalidationTrackingEvents;
+ InspectorTest.assertEquals(secondInvalidations.length, 3);
+ InspectorTest.assertEquals(secondInvalidations[0].type, WebInspector.TracingTimelineModel.RecordType.StyleRecalcInvalidationTracking);
+ InspectorTest.assertEquals(secondInvalidations[0].nodeName, "DIV");
+ InspectorTest.assertEquals(secondInvalidations[1].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
+ InspectorTest.assertEquals(secondInvalidations[1].nodeName, "DIV");
+ InspectorTest.assertGreaterOrEqual(secondInvalidations[1].stackTrace.length, 1);
+ InspectorTest.assertEquals(secondInvalidations[2].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
+ InspectorTest.assertEquals(secondInvalidations[2].nodeName, "#document");
+ InspectorTest.assertGreaterOrEqual(secondInvalidations[2].stackTrace.length, 1);
- // The second paint corresponds to the subframe and should have our layout/style invalidations.
- var secondPaintRecord = InspectorTest.findTimelineRecord(WebInspector.TimelineModel.RecordType.Paint, 1);
- var secondInvalidations = secondPaintRecord._event.invalidationTrackingEvents;
- InspectorTest.assertEquals(secondInvalidations.length, 3);
- InspectorTest.assertEquals(secondInvalidations[0].type, WebInspector.TracingTimelineModel.RecordType.StyleRecalcInvalidationTracking);
- InspectorTest.assertEquals(secondInvalidations[0].nodeName, "DIV");
- InspectorTest.assertEquals(secondInvalidations[1].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
- InspectorTest.assertEquals(secondInvalidations[1].nodeName, "DIV");
- InspectorTest.assertGreaterOrEqual(secondInvalidations[1].stackTrace.length, 1);
- InspectorTest.assertEquals(secondInvalidations[2].type, WebInspector.TracingTimelineModel.RecordType.LayoutInvalidationTracking);
- InspectorTest.assertEquals(secondInvalidations[2].nodeName, "#document");
- InspectorTest.assertGreaterOrEqual(secondInvalidations[2].stackTrace.length, 1);
- next();
+ next();
+ });
}
]);
}
« no previous file with comments | « no previous file | LayoutTests/inspector/tracing/timeline-paint-with-layout-invalidations-on-deleted-node.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698