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

Unified Diff: content/test/test_web_contents.cc

Issue 1721813002: Adding DRP specfic UMA for FirstContentfulPaint (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing nits Created 4 years, 9 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/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index c424f939f82602b0c376637bef1bd4e7e7432fa2..9b47d2a3a19191fb11bce6c6143a9a3ccf30d041 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -23,22 +23,22 @@
#include "content/public/test/mock_render_process_host.h"
#include "content/test/test_render_view_host.h"
#include "ui/base/page_transition_types.h"
namespace content {
TestWebContents::TestWebContents(BrowserContext* browser_context)
: WebContentsImpl(browser_context),
delegate_view_override_(NULL),
expect_set_history_offset_and_length_(false),
- expect_set_history_offset_and_length_history_length_(0) {
-}
+ expect_set_history_offset_and_length_history_length_(0),
+ simulate_used_data_reduction_proxy_(false) {}
TestWebContents* TestWebContents::Create(BrowserContext* browser_context,
SiteInstance* instance) {
TestWebContents* test_web_contents = new TestWebContents(browser_context);
test_web_contents->Init(WebContents::CreateParams(browser_context, instance));
return test_web_contents;
}
TestWebContents::~TestWebContents() {
EXPECT_FALSE(expect_set_history_offset_and_length_);
@@ -245,20 +245,22 @@ void TestWebContents::CommitPendingNavigation() {
CHECK(!browser_side_navigation || rfh->is_loading());
CHECK(!browser_side_navigation ||
!rfh->frame_tree_node()->navigation_request());
int page_id = entry->GetPageID();
if (page_id == -1) {
// It's a new navigation, assign a never-seen page id to it.
page_id = GetMaxPageIDForSiteInstance(rfh->GetSiteInstance()) + 1;
}
+ rfh->set_simulate_used_data_reduction_proxy(
+ simulate_used_data_reduction_proxy_);
rfh->SendNavigate(page_id, entry->GetUniqueID(),
GetController().GetPendingEntryIndex() == -1,
entry->GetURL());
// Simulate the SwapOut_ACK. This is needed when cross-site navigation
// happens.
if (old_rfh != rfh)
old_rfh->OnSwappedOut();
}
void TestWebContents::ProceedWithCrossSiteNavigation() {

Powered by Google App Engine
This is Rietveld 408576698