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

Side by Side Diff: components/test_runner/web_frame_test_client.cc

Issue 2652123002: PlzNavigate: Attempt to fix blink layout tests which fail due to duplicate output from WebFrameClie… (Closed)
Patch Set: Fix redness Created 3 years, 10 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
« no previous file with comments | « no previous file | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "components/test_runner/web_frame_test_client.h" 5 #include "components/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 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 } 531 }
532 532
533 void WebFrameTestClient::didDispatchPingLoader(const blink::WebURL& url) { 533 void WebFrameTestClient::didDispatchPingLoader(const blink::WebURL& url) {
534 if (test_runner()->shouldDumpPingLoaderCallbacks()) 534 if (test_runner()->shouldDumpPingLoaderCallbacks())
535 delegate_->PrintMessage(std::string("PingLoader dispatched to '") + 535 delegate_->PrintMessage(std::string("PingLoader dispatched to '") +
536 URLDescription(url).c_str() + "'.\n"); 536 URLDescription(url).c_str() + "'.\n");
537 } 537 }
538 538
539 void WebFrameTestClient::willSendRequest(blink::WebLocalFrame* frame, 539 void WebFrameTestClient::willSendRequest(blink::WebLocalFrame* frame,
540 blink::WebURLRequest& request) { 540 blink::WebURLRequest& request) {
541 // PlzNavigate
542 // Navigation requests initiated by the renderer will have been logged when
543 // the navigation was sent to the browser. Please see
544 // the RenderFrameImpl::BeginNavigation() function.
545 if (delegate_->IsNavigationInitiatedByRenderer(request))
546 return;
541 // Need to use GURL for host() and SchemeIs() 547 // Need to use GURL for host() and SchemeIs()
542 GURL url = request.url(); 548 GURL url = request.url();
543 std::string request_url = url.possibly_invalid_spec(); 549 std::string request_url = url.possibly_invalid_spec();
544 550
545 GURL main_document_url = request.firstPartyForCookies(); 551 GURL main_document_url = request.firstPartyForCookies();
546 552
547 if (test_runner()->shouldDumpResourceLoadCallbacks()) { 553 if (test_runner()->shouldDumpResourceLoadCallbacks()) {
548 delegate_->PrintMessage(DescriptionSuitableForTestResult(request_url)); 554 delegate_->PrintMessage(DescriptionSuitableForTestResult(request_url));
549 delegate_->PrintMessage(" - willSendRequest <NSURLRequest URL "); 555 delegate_->PrintMessage(" - willSendRequest <NSURLRequest URL ");
550 delegate_->PrintMessage( 556 delegate_->PrintMessage(
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
710 blink::WebEffectiveConnectionType 716 blink::WebEffectiveConnectionType
711 WebFrameTestClient::getEffectiveConnectionType() { 717 WebFrameTestClient::getEffectiveConnectionType() {
712 return test_runner()->effective_connection_type(); 718 return test_runner()->effective_connection_type();
713 } 719 }
714 720
715 TestRunner* WebFrameTestClient::test_runner() { 721 TestRunner* WebFrameTestClient::test_runner() {
716 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); 722 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner();
717 } 723 }
718 724
719 } // namespace test_runner 725 } // namespace test_runner
OLDNEW
« no previous file with comments | « no previous file | components/test_runner/web_test_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698