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

Unified Diff: content/public/test/test_renderer_host.cc

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created a DRP PageLoadMetricsObserver Created 4 years, 10 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: content/public/test/test_renderer_host.cc
diff --git a/content/public/test/test_renderer_host.cc b/content/public/test/test_renderer_host.cc
index 25352991dbb3ade3b71721c937b9f7004ae733c5..fd66c82f28119ba069408a03da5397f791fd37ab 100644
--- a/content/public/test/test_renderer_host.cc
+++ b/content/public/test/test_renderer_host.cc
@@ -155,20 +155,26 @@ WebContents* RenderViewHostTestHarness::CreateTestWebContents() {
SiteInstance* instance = SiteInstance::Create(browser_context_.get());
instance->GetProcess()->Init();
return TestWebContents::Create(browser_context_.get(), instance);
}
void RenderViewHostTestHarness::NavigateAndCommit(const GURL& url) {
static_cast<TestWebContents*>(web_contents())->NavigateAndCommit(url);
}
+void RenderViewHostTestHarness::SetSimulateUsedDataReductionProxy(
+ bool enabled) {
+ static_cast<TestWebContents*>(web_contents())
+ ->set_simulate_used_data_reduction_proxy(enabled);
+}
+
void RenderViewHostTestHarness::Reload() {
NavigationEntry* entry = controller().GetLastCommittedEntry();
DCHECK(entry);
controller().Reload(false);
RenderFrameHostTester::For(main_rfh())
->SendNavigateWithTransition(entry->GetPageID(), entry->GetUniqueID(),
false, entry->GetURL(),
ui::PAGE_TRANSITION_RELOAD);
}

Powered by Google App Engine
This is Rietveld 408576698