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

Side by Side Diff: content/shell/test_runner/web_frame_test_client.cc

Issue 2734633002: PlzNavigate: Fix the http/tests/loading/307-after-303-after-post.html and the http/tests/loading/re… (Closed)
Patch Set: Fix comment Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/shell/test_runner/web_frame_test_client.h" 5 #include "content/shell/test_runner/web_frame_test_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
407 } 407 }
408 408
409 void WebFrameTestClient::loadErrorPage(int reason) { 409 void WebFrameTestClient::loadErrorPage(int reason) {
410 if (test_runner()->shouldDumpFrameLoadCallbacks()) { 410 if (test_runner()->shouldDumpFrameLoadCallbacks()) {
411 delegate_->PrintMessage(base::StringPrintf( 411 delegate_->PrintMessage(base::StringPrintf(
412 "- loadErrorPage: %s\n", net::ErrorToString(reason).c_str())); 412 "- loadErrorPage: %s\n", net::ErrorToString(reason).c_str()));
413 } 413 }
414 } 414 }
415 415
416 void WebFrameTestClient::didStartProvisionalLoad( 416 void WebFrameTestClient::didStartProvisionalLoad(
417 blink::WebDataSource* data_source) { 417 blink::WebDataSource* data_source,
418 blink::WebURLRequest& request) {
418 // PlzNavigate 419 // PlzNavigate
419 // A provisional load notification is received when a frame navigation is 420 // A provisional load notification is received when a frame navigation is
420 // sent to the browser. We don't want to log it again during commit. 421 // sent to the browser. We don't want to log it again during commit.
421 if (delegate_->IsNavigationInitiatedByRenderer(data_source->getRequest())) 422 if (delegate_->IsNavigationInitiatedByRenderer(request))
422 return; 423 return;
423 424
424 test_runner()->tryToSetTopLoadingFrame( 425 test_runner()->tryToSetTopLoadingFrame(
425 web_frame_test_proxy_base_->web_frame()); 426 web_frame_test_proxy_base_->web_frame());
426 427
427 if (test_runner()->shouldDumpFrameLoadCallbacks()) { 428 if (test_runner()->shouldDumpFrameLoadCallbacks()) {
428 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame()); 429 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame());
429 delegate_->PrintMessage(" - didStartProvisionalLoadForFrame\n"); 430 delegate_->PrintMessage(" - didStartProvisionalLoadForFrame\n");
430 } 431 }
431 432
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
733 blink::WebEffectiveConnectionType 734 blink::WebEffectiveConnectionType
734 WebFrameTestClient::getEffectiveConnectionType() { 735 WebFrameTestClient::getEffectiveConnectionType() {
735 return test_runner()->effective_connection_type(); 736 return test_runner()->effective_connection_type();
736 } 737 }
737 738
738 TestRunner* WebFrameTestClient::test_runner() { 739 TestRunner* WebFrameTestClient::test_runner() {
739 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); 740 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner();
740 } 741 }
741 742
742 } // namespace test_runner 743 } // namespace test_runner
OLDNEW
« no previous file with comments | « content/shell/test_runner/web_frame_test_client.h ('k') | content/shell/test_runner/web_frame_test_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698