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

Side by Side Diff: chrome/browser/page_load_metrics/observers/page_load_metrics_observer_test_harness.cc

Issue 2132603002: [page_load_metrics] Add a NavigationThrottle for richer abort metrics (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nasko@ nits Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_ test_harness.h" 5 #include "chrome/browser/page_load_metrics/observers/page_load_metrics_observer_ test_harness.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 const PageLoadExtraInfo 135 const PageLoadExtraInfo
136 PageLoadMetricsObserverTestHarness::GetPageLoadExtraInfoForCommittedLoad() { 136 PageLoadMetricsObserverTestHarness::GetPageLoadExtraInfoForCommittedLoad() {
137 return observer_->GetPageLoadExtraInfoForCommittedLoad(); 137 return observer_->GetPageLoadExtraInfoForCommittedLoad();
138 } 138 }
139 139
140 void PageLoadMetricsObserverTestHarness::NavigateWithPageTransitionAndCommit( 140 void PageLoadMetricsObserverTestHarness::NavigateWithPageTransitionAndCommit(
141 const GURL& url, 141 const GURL& url,
142 ui::PageTransition transition) { 142 ui::PageTransition transition) {
143 controller().LoadURL(url, content::Referrer(), transition, std::string()); 143 controller().LoadURL(url, content::Referrer(), transition, std::string());
144 int pending_id = controller().GetPendingEntry()->GetUniqueID(); 144 content::WebContentsTester::For(web_contents())->CommitPendingNavigation();
145 const bool did_create_new_entry = true;
146 content::WebContentsTester::For(web_contents())
147 ->TestDidNavigate(web_contents()->GetMainFrame(), 1, pending_id,
148 did_create_new_entry, url, transition);
149 } 145 }
150 146
151 } // namespace page_load_metrics 147 } // namespace page_load_metrics
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698