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

Unified Diff: tracing/tracing/importer/find_load_expectations.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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: tracing/tracing/importer/find_load_expectations.html
diff --git a/tracing/tracing/importer/find_load_expectations.html b/tracing/tracing/importer/find_load_expectations.html
index 5a20648834f6e218ada4254bc25dbbefadc88337..c9135599c8cffebe8a38d71abc9f3d3e8e5f3fd0 100644
--- a/tracing/tracing/importer/find_load_expectations.html
+++ b/tracing/tracing/importer/find_load_expectations.html
@@ -20,16 +20,20 @@ tr.exportTo('tr.importer', function() {
function findLoadExpectations(modelHelper) {
var events = [];
- modelHelper.model.iterateAllEvents(function(event) {
+ for (var event of modelHelper.model.getDescendantEvents()) {
if ((event.title === NAVIGATION_START) ||
(event.title === FIRST_CONTENTFUL_PAINT_TITLE))
events.push(event);
- });
+ }
events.sort(tr.importer.compareEvents);
var loads = [];
var startEvent = undefined;
- events.forEach(function(event) {
+ // TODO(alexandermont): What's supposed to happen if there are two
+ // NAVIGATION_STARTs with no FIRST_CONTENTFUL_PAINT_TITLE between
+ // them? Are you supposed to just "lose" the first NAVIGATION_START,
+ // like what's happening now?
+ for (var event of events) {
if (event.title === NAVIGATION_START) {
startEvent = event;
} else if (event.title === FIRST_CONTENTFUL_PAINT_TITLE) {
@@ -40,7 +44,7 @@ tr.exportTo('tr.importer', function() {
startEvent = undefined;
}
}
- });
+ }
// If the trace ended between navigation start and first contentful paint,
// then make a LoadExpectation that ends at the end of the trace.
« no previous file with comments | « tracing/tracing/importer/find_input_expectations.html ('k') | tracing/tracing/importer/user_expectation_verifier.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698