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

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: Nits Created 4 years, 7 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
« no previous file with comments | « content/test/test_web_contents.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/test_web_contents.cc
diff --git a/content/test/test_web_contents.cc b/content/test/test_web_contents.cc
index 1233696ab82fd787bad8fb9445912e2577f623c2..898fb1f69320060223531eaa777735911392137b 100644
--- a/content/test/test_web_contents.cc
+++ b/content/test/test_web_contents.cc
@@ -2,26 +2,28 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/test/test_web_contents.h"
#include <utility>
#include "content/browser/browser_url_handler_impl.h"
#include "content/browser/frame_host/cross_process_frame_connector.h"
#include "content/browser/frame_host/navigation_entry_impl.h"
+#include "content/browser/frame_host/navigation_handle_impl.h"
#include "content/browser/frame_host/navigator.h"
#include "content/browser/frame_host/navigator_impl.h"
#include "content/browser/renderer_host/render_view_host_impl.h"
#include "content/browser/site_instance_impl.h"
#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
+#include "content/public/browser/navigation_data.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/common/browser_side_navigation_policy.h"
#include "content/public/common/page_state.h"
#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 {
@@ -306,20 +308,27 @@ void TestWebContents::TestDidFinishLoad(const GURL& url) {
void TestWebContents::TestDidFailLoadWithError(
const GURL& url,
int error_code,
const base::string16& error_description,
bool was_ignored_by_handler) {
FrameHostMsg_DidFailLoadWithError msg(
0, url, error_code, error_description, was_ignored_by_handler);
frame_tree_.root()->current_frame_host()->OnMessageReceived(msg);
}
+void TestWebContents::SetNavigationData(
+ NavigationHandle* navigation_handle,
+ std::unique_ptr<NavigationData> navigation_data) {
+ static_cast<NavigationHandleImpl*>(navigation_handle)
+ ->set_navigation_data(std::move(navigation_data));
+}
+
void TestWebContents::CreateNewWindow(
SiteInstance* source_site_instance,
int32_t route_id,
int32_t main_frame_route_id,
int32_t main_frame_widget_route_id,
const ViewHostMsg_CreateWindow_Params& params,
SessionStorageNamespace* session_storage_namespace) {}
void TestWebContents::CreateNewWidget(int32_t render_process_id,
int32_t route_id,
« no previous file with comments | « content/test/test_web_contents.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698