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

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

Issue 2781723007: Plumb initiator out of Blink. (Closed)
Patch Set: Created 3 years, 8 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 } 406 }
407 407
408 void WebFrameTestClient::loadErrorPage(int reason) { 408 void WebFrameTestClient::loadErrorPage(int reason) {
409 if (test_runner()->shouldDumpFrameLoadCallbacks()) { 409 if (test_runner()->shouldDumpFrameLoadCallbacks()) {
410 delegate_->PrintMessage(base::StringPrintf( 410 delegate_->PrintMessage(base::StringPrintf(
411 "- loadErrorPage: %s\n", net::ErrorToString(reason).c_str())); 411 "- loadErrorPage: %s\n", net::ErrorToString(reason).c_str()));
412 } 412 }
413 } 413 }
414 414
415 void WebFrameTestClient::didStartProvisionalLoad( 415 void WebFrameTestClient::didStartProvisionalLoad(
416 blink::WebLocalFrame* initiator_frame,
416 blink::WebDataSource* data_source, 417 blink::WebDataSource* data_source,
417 blink::WebURLRequest& request) { 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(request)) 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());
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
749 blink::WebEffectiveConnectionType 750 blink::WebEffectiveConnectionType
750 WebFrameTestClient::getEffectiveConnectionType() { 751 WebFrameTestClient::getEffectiveConnectionType() {
751 return test_runner()->effective_connection_type(); 752 return test_runner()->effective_connection_type();
752 } 753 }
753 754
754 TestRunner* WebFrameTestClient::test_runner() { 755 TestRunner* WebFrameTestClient::test_runner() {
755 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); 756 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner();
756 } 757 }
757 758
758 } // namespace test_runner 759 } // 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