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

Unified Diff: LayoutTests/inspector/timeline/timeline-paint.html

Issue 461323003: DevTools: Make Timeline tests use only model records (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/inspector/timeline/timeline-paint.html
diff --git a/LayoutTests/inspector/timeline/timeline-paint.html b/LayoutTests/inspector/timeline/timeline-paint.html
index 32a20923004a7ed33d6a93b0cc1de49ee7d9c283..2ea833958c1fa7a9dcdd77ae277b09d5a0f0c0a3 100644
--- a/LayoutTests/inspector/timeline/timeline-paint.html
+++ b/LayoutTests/inspector/timeline/timeline-paint.html
@@ -28,9 +28,9 @@ function test()
function step1(records)
{
- var filteredRecords = InspectorTest.filterTimelineRecords(WebInspector.TimelineModel.RecordType.Paint, true);
- if (filteredRecords.length)
- InspectorTest.printTimelineRecordProperties(filteredRecords[0]);
+ var record = InspectorTest.findFirstTimelineRecord(WebInspector.TimelineModel.RecordType.Paint);
+ if (record)
+ InspectorTest.printTimelineRecordProperties(record);
else
InspectorTest.addResult("FAIL: no paint record found");
InspectorTest.invokeAsyncWithTimeline("updateSubframeAndDisplay", step3);
@@ -38,19 +38,11 @@ function test()
function step3(records)
{
- var filteredRecords = InspectorTest.filterTimelineRecords(WebInspector.TimelineModel.RecordType.Paint, true);
- var paintRecord;
- for (var i = 0; i < filteredRecords.length; ++i) {
- var record = filteredRecords[i];
- if (record.children && record.children.length) {
- paintRecord = record;
- break;
- }
- }
+ var paintRecord = InspectorTest.findFirstTimelineRecord(WebInspector.TimelineModel.RecordType.Paint);
InspectorTest.assertTrue(paintRecord, "Paint record with subframe paint not found");
- var topQuad = paintRecord.data.clip;
- var subframePaint = paintRecord.children[0];
- var subframeQuad = subframePaint.data.clip;
+ var topQuad = paintRecord.data().clip;
+ var subframePaint = paintRecord.children()[0];
+ var subframeQuad = subframePaint.data().clip;
InspectorTest.assertEquals(8, topQuad.length);
InspectorTest.assertEquals(8, subframeQuad.length);
InspectorTest.assertGreaterOrEqual(subframeQuad[0], topQuad[0]);
« no previous file with comments | « LayoutTests/inspector/timeline/timeline-node-reference.html ('k') | LayoutTests/inspector/timeline/timeline-script-tag-1.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698