OLD | NEW |
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
429 delegate_->PrintMessage(" - didStartProvisionalLoadForFrame\n"); | 429 delegate_->PrintMessage(" - didStartProvisionalLoadForFrame\n"); |
430 } | 430 } |
431 | 431 |
432 if (test_runner()->shouldDumpUserGestureInFrameLoadCallbacks()) { | 432 if (test_runner()->shouldDumpUserGestureInFrameLoadCallbacks()) { |
433 PrintFrameuserGestureStatus(delegate_, | 433 PrintFrameuserGestureStatus(delegate_, |
434 web_frame_test_proxy_base_->web_frame(), | 434 web_frame_test_proxy_base_->web_frame(), |
435 " - in didStartProvisionalLoadForFrame\n"); | 435 " - in didStartProvisionalLoadForFrame\n"); |
436 } | 436 } |
437 } | 437 } |
438 | 438 |
439 void WebFrameTestClient::didReceiveServerRedirectForProvisionalLoad( | 439 void WebFrameTestClient::didReceiveServerRedirectForProvisionalLoad() { |
440 blink::WebLocalFrame* frame) { | |
441 DCHECK_EQ(frame, web_frame_test_proxy_base_->web_frame()); | |
442 if (test_runner()->shouldDumpFrameLoadCallbacks()) { | 440 if (test_runner()->shouldDumpFrameLoadCallbacks()) { |
443 PrintFrameDescription(delegate_, frame); | 441 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame()); |
444 delegate_->PrintMessage( | 442 delegate_->PrintMessage( |
445 " - didReceiveServerRedirectForProvisionalLoadForFrame\n"); | 443 " - didReceiveServerRedirectForProvisionalLoadForFrame\n"); |
446 } | 444 } |
447 } | 445 } |
448 | 446 |
449 void WebFrameTestClient::didFailProvisionalLoad( | 447 void WebFrameTestClient::didFailProvisionalLoad( |
450 blink::WebLocalFrame* frame, | 448 blink::WebLocalFrame* frame, |
451 const blink::WebURLError& error, | 449 const blink::WebURLError& error, |
452 blink::WebHistoryCommitType commit_type) { | 450 blink::WebHistoryCommitType commit_type) { |
453 if (test_runner()->shouldDumpFrameLoadCallbacks()) { | 451 if (test_runner()->shouldDumpFrameLoadCallbacks()) { |
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 blink::WebEffectiveConnectionType | 747 blink::WebEffectiveConnectionType |
750 WebFrameTestClient::getEffectiveConnectionType() { | 748 WebFrameTestClient::getEffectiveConnectionType() { |
751 return test_runner()->effective_connection_type(); | 749 return test_runner()->effective_connection_type(); |
752 } | 750 } |
753 | 751 |
754 TestRunner* WebFrameTestClient::test_runner() { | 752 TestRunner* WebFrameTestClient::test_runner() { |
755 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); | 753 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); |
756 } | 754 } |
757 | 755 |
758 } // namespace test_runner | 756 } // namespace test_runner |
OLD | NEW |