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

Unified Diff: components/test_runner/web_frame_test_client.cc

Issue 2661743002: PlzNavigate: Invoke didStartProvisionalLoad() when the renderer initiates a navigation in startLoad( (Closed)
Patch Set: Add comment Created 3 years, 11 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 | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/test_runner/web_frame_test_client.cc
diff --git a/components/test_runner/web_frame_test_client.cc b/components/test_runner/web_frame_test_client.cc
index ca0aa871cf8c7080239684ef9614ce313809b63e..c6652364067778c85f483c2c449cb86e0a60feac 100644
--- a/components/test_runner/web_frame_test_client.cc
+++ b/components/test_runner/web_frame_test_client.cc
@@ -29,6 +29,7 @@
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/platform/WebURLResponse.h"
#include "third_party/WebKit/public/web/WebConsoleMessage.h"
+#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebLocalFrame.h"
@@ -413,6 +414,14 @@ void WebFrameTestClient::loadErrorPage(int reason) {
}
void WebFrameTestClient::didStartProvisionalLoad(blink::WebLocalFrame* frame) {
+ // PlzNavigate
+ // A provisional load notification is received when a frame navigation is
+ // sent to the browser. We don't want to log it again during commit.
+ // Please see the RenderFrameImpl::BeginNavigation() function.
clamy 2017/01/31 00:20:01 I'm a bit worried about this. Considering at which
ananta 2017/01/31 03:37:07 I added the request as a parameter to WebFrameClie
+ blink::WebDataSource* ds = frame->provisionalDataSource();
+ if (ds && delegate_->IsNavigationInitiatedByRenderer(ds->getRequest()))
+ return;
+
test_runner()->tryToSetTopLoadingFrame(frame);
if (test_runner()->shouldDumpFrameLoadCallbacks()) {
« no previous file with comments | « no previous file | content/renderer/render_frame_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698