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

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: Rebased to tip 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
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..d52efb6ff2097d9484a6b1dc43afc0af42517c62 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"
@@ -412,7 +413,15 @@ void WebFrameTestClient::loadErrorPage(int reason) {
}
}
-void WebFrameTestClient::didStartProvisionalLoad(blink::WebLocalFrame* frame) {
+void WebFrameTestClient::didStartProvisionalLoad(
+ blink::WebLocalFrame* frame,
Nate Chapin 2017/02/02 19:16:48 Could we use web_frame_test_proxy_base_->web_frame
ananta 2017/02/02 23:54:02 Done.
+ blink::WebDataSource* data_source) {
+ // 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.
+ if (delegate_->IsNavigationInitiatedByRenderer(data_source->getRequest()))
+ return;
+
test_runner()->tryToSetTopLoadingFrame(frame);
if (test_runner()->shouldDumpFrameLoadCallbacks()) {

Powered by Google App Engine
This is Rietveld 408576698