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 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
456 | 456 |
457 void WebFrameTestClient::DidCommitProvisionalLoad( | 457 void WebFrameTestClient::DidCommitProvisionalLoad( |
458 const blink::WebHistoryItem& history_item, | 458 const blink::WebHistoryItem& history_item, |
459 blink::WebHistoryCommitType history_type) { | 459 blink::WebHistoryCommitType history_type) { |
460 if (test_runner()->shouldDumpFrameLoadCallbacks()) { | 460 if (test_runner()->shouldDumpFrameLoadCallbacks()) { |
461 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame()); | 461 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame()); |
462 delegate_->PrintMessage(" - didCommitLoadForFrame\n"); | 462 delegate_->PrintMessage(" - didCommitLoadForFrame\n"); |
463 } | 463 } |
464 } | 464 } |
465 | 465 |
466 void WebFrameTestClient::DidReceiveTitle(blink::WebLocalFrame* frame, | 466 void WebFrameTestClient::DidReceiveTitle(const blink::WebString& title, |
467 const blink::WebString& title, | |
468 blink::WebTextDirection direction) { | 467 blink::WebTextDirection direction) { |
469 if (test_runner()->shouldDumpFrameLoadCallbacks()) { | 468 if (test_runner()->shouldDumpFrameLoadCallbacks()) { |
470 PrintFrameDescription(delegate_, frame); | 469 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame()); |
471 delegate_->PrintMessage(std::string(" - didReceiveTitle: ") + title.Utf8() + | 470 delegate_->PrintMessage(std::string(" - didReceiveTitle: ") + title.Utf8() + |
472 "\n"); | 471 "\n"); |
473 } | 472 } |
474 | 473 |
475 if (test_runner()->shouldDumpTitleChanges()) | 474 if (test_runner()->shouldDumpTitleChanges()) |
476 delegate_->PrintMessage(std::string("TITLE CHANGED: '") + title.Utf8() + | 475 delegate_->PrintMessage(std::string("TITLE CHANGED: '") + title.Utf8() + |
477 "'\n"); | 476 "'\n"); |
478 } | 477 } |
479 | 478 |
480 void WebFrameTestClient::DidChangeIcon(blink::WebIconURL::Type icon_type) { | 479 void WebFrameTestClient::DidChangeIcon(blink::WebIconURL::Type icon_type) { |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
740 blink::WebEffectiveConnectionType | 739 blink::WebEffectiveConnectionType |
741 WebFrameTestClient::GetEffectiveConnectionType() { | 740 WebFrameTestClient::GetEffectiveConnectionType() { |
742 return test_runner()->effective_connection_type(); | 741 return test_runner()->effective_connection_type(); |
743 } | 742 } |
744 | 743 |
745 TestRunner* WebFrameTestClient::test_runner() { | 744 TestRunner* WebFrameTestClient::test_runner() { |
746 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); | 745 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); |
747 } | 746 } |
748 | 747 |
749 } // namespace test_runner | 748 } // namespace test_runner |
OLD | NEW |