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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
473 PrintFrameDescription(delegate_, frame); | 473 PrintFrameDescription(delegate_, frame); |
474 delegate_->PrintMessage(std::string(" - didReceiveTitle: ") + title.utf8() + | 474 delegate_->PrintMessage(std::string(" - didReceiveTitle: ") + title.utf8() + |
475 "\n"); | 475 "\n"); |
476 } | 476 } |
477 | 477 |
478 if (test_runner()->shouldDumpTitleChanges()) | 478 if (test_runner()->shouldDumpTitleChanges()) |
479 delegate_->PrintMessage(std::string("TITLE CHANGED: '") + title.utf8() + | 479 delegate_->PrintMessage(std::string("TITLE CHANGED: '") + title.utf8() + |
480 "'\n"); | 480 "'\n"); |
481 } | 481 } |
482 | 482 |
483 void WebFrameTestClient::didChangeIcon(blink::WebLocalFrame* frame, | 483 void WebFrameTestClient::didChangeIcon(blink::WebIconURL::Type icon_type) { |
484 blink::WebIconURL::Type icon_type) { | |
485 if (test_runner()->shouldDumpIconChanges()) { | 484 if (test_runner()->shouldDumpIconChanges()) { |
486 PrintFrameDescription(delegate_, frame); | 485 PrintFrameDescription(delegate_, web_frame_test_proxy_base_->web_frame()); |
487 delegate_->PrintMessage(std::string(" - didChangeIcons\n")); | 486 delegate_->PrintMessage(std::string(" - didChangeIcons\n")); |
488 } | 487 } |
489 } | 488 } |
490 | 489 |
491 void WebFrameTestClient::didFinishDocumentLoad(blink::WebLocalFrame* frame) { | 490 void WebFrameTestClient::didFinishDocumentLoad(blink::WebLocalFrame* frame) { |
492 DCHECK_EQ(frame, web_frame_test_proxy_base_->web_frame()); | 491 DCHECK_EQ(frame, web_frame_test_proxy_base_->web_frame()); |
493 if (test_runner()->shouldDumpFrameLoadCallbacks()) { | 492 if (test_runner()->shouldDumpFrameLoadCallbacks()) { |
494 PrintFrameDescription(delegate_, frame); | 493 PrintFrameDescription(delegate_, frame); |
495 delegate_->PrintMessage(" - didFinishDocumentLoadForFrame\n"); | 494 delegate_->PrintMessage(" - didFinishDocumentLoadForFrame\n"); |
496 } | 495 } |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 blink::WebEffectiveConnectionType | 748 blink::WebEffectiveConnectionType |
750 WebFrameTestClient::getEffectiveConnectionType() { | 749 WebFrameTestClient::getEffectiveConnectionType() { |
751 return test_runner()->effective_connection_type(); | 750 return test_runner()->effective_connection_type(); |
752 } | 751 } |
753 | 752 |
754 TestRunner* WebFrameTestClient::test_runner() { | 753 TestRunner* WebFrameTestClient::test_runner() { |
755 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); | 754 return web_view_test_proxy_base_->test_interfaces()->GetTestRunner(); |
756 } | 755 } |
757 | 756 |
758 } // namespace test_runner | 757 } // namespace test_runner |
OLD | NEW |