Index: chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
diff --git a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
index 711eed8760f7c30adc9699d412f778bc571a9d3c..0f8527c5d6c0ff39b8f656a90e6f1ed91377e443 100644 |
--- a/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
+++ b/chrome/browser/page_load_metrics/metrics_web_contents_observer.cc |
@@ -215,7 +215,12 @@ PageLoadTracker* MetricsWebContentsObserver::GetTrackerOrNullForRequest( |
const content::GlobalRequestID& request_id, |
content::ResourceType resource_type, |
base::TimeTicks creation_time) { |
- if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME) { |
+ // TODO(jkarlin): The test frameworks don't provide a default |
+ // GlobalRequestID to their NavigationHandles. Once the test frameworks |
+ // support real ids, remove the request_id != content::GlobalRequestID() |
+ // condition. See https://crbug.com/711352. |
Bryan McQuade
2017/05/16 16:22:36
Does csharrison's https://codereview.chromium.org/
jkarlin
2017/05/16 17:16:08
It addresses it for tests that use Navigation Simu
|
+ if (resource_type == content::RESOURCE_TYPE_MAIN_FRAME && |
+ request_id != content::GlobalRequestID()) { |
// The main frame request can complete either before or after commit, so we |
// look at both provisional loads and the committed load to find a |
// PageLoadTracker with a matching request id. See https://goo.gl/6TzCYN for |