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

Unified Diff: LayoutTests/http/tests/inspector/timeline-test.js

Issue 671913005: Implement layout invalidation tracking in devtools (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
Index: LayoutTests/http/tests/inspector/timeline-test.js
diff --git a/LayoutTests/http/tests/inspector/timeline-test.js b/LayoutTests/http/tests/inspector/timeline-test.js
index d340854654ef387d168b96ca23ff0a09914b0581..d52200438f9f0ec64a6d1efa1a35484d61ffac24 100644
--- a/LayoutTests/http/tests/inspector/timeline-test.js
+++ b/LayoutTests/http/tests/inspector/timeline-test.js
@@ -280,13 +280,23 @@ InspectorTest.printTimelineRecordProperties = function(record)
InspectorTest.findFirstTimelineRecord = function(type)
{
+ return InspectorTest.findTimelineRecord(type, 0);
+}
+
+// Find the (n+1)th timeline record of a specific type.
+InspectorTest.findTimelineRecord = function(type, n)
+{
var result;
function findByType(record)
{
if (record.type() !== type)
return false;
- result = record;
- return true;
+ if (n === 0) {
+ result = record;
+ return true;
+ }
+ n--;
+ return false;
}
InspectorTest.timelineModel().forAllRecords(findByType);
return result;

Powered by Google App Engine
This is Rietveld 408576698