Stop tracking page loads for non-HTML resources in https engagement browsertest |
|||||
Issue descriptionThe current PageLoadTracker/PageLoadMetricsObserver implementation is a little confusing when it comes to tracking of non-HTML resources. The render process doesn't report any timing data for these resources, but we do instantiate PageLoadMetricsObservers and invoke OnComplete on them for non-HTML main resouces. For most observers, then ends up being ok, because observers often check to see if the PageLoadTiming passed to OnComplete is empty before logging metrics. However, for observers that don't care about timing, such as the https engagement observer, it's non-obvious that you need to check that timing is empty to filter out non-HTML main resource loads. apf indicated that she doesn't want to include non-HTML main resource loads in the https engagement observer. For now, we should add a check for timing.IsEmpty to fix the broken behavior. The right longer term fix is to stop calling OnComplete for non-HTML observers, as all of our existing observers only want to track HTML main resources. If in the future we have observers that want to track non-HTML resources, we'll need to add a mechanism to allow them to opt in to tracking other resource types, since is the non-default behavior.
,
Jul 12 2016
,
Jul 13 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/9ecb585652429b88c8a802833bfe24c7fef128d8 commit 9ecb585652429b88c8a802833bfe24c7fef128d8 Author: bmcquade <bmcquade@chromium.org> Date: Wed Jul 13 19:40:24 2016 Update https engagement browsertest to always use HTML resources. A few https engagement tests used the test server resource at URL '/'. It turns out that this resource gets served with mime type text/plain, which we're planning to have page load metrics infrastructure ignore in the future. This change switches those tests to use '/simple.html' which is served with mime type text/html. Additionally, this change adds a new test Navigate_Both_NonHtmlMainResource, which we'll use to verify that we do not track non-HTML resources. The test currently asserts that we do track these resources, with a comment explaining that we'll update it to assert they are untracked as part of fixing bug 627536 . BUG= 627536 Review-Url: https://codereview.chromium.org/2148473002 Cr-Commit-Position: refs/heads/master@{#405226} [modify] https://crrev.com/9ecb585652429b88c8a802833bfe24c7fef128d8/chrome/browser/page_load_metrics/observers/https_engagement_page_load_metrics_observer_browsertest.cc
,
Jul 14 2016
,
Jul 14 2016
,
Jul 15 2016
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by bmcquade@chromium.org
, Jul 12 2016