| 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 481 } | 481 } |
| 482 | 482 |
| 483 void WebFrameTestClient::didChangeIcon(blink::WebLocalFrame* frame, | 483 void WebFrameTestClient::didChangeIcon(blink::WebLocalFrame* frame, |
| 484 blink::WebIconURL::Type icon_type) { | 484 blink::WebIconURL::Type icon_type) { |
| 485 if (test_runner()->shouldDumpIconChanges()) { | 485 if (test_runner()->shouldDumpIconChanges()) { |
| 486 PrintFrameDescription(delegate_, frame); | 486 PrintFrameDescription(delegate_, frame); |
| 487 delegate_->PrintMessage(std::string(" - didChangeIcons\n")); | 487 delegate_->PrintMessage(std::string(" - didChangeIcons\n")); |
| 488 } | 488 } |
| 489 } | 489 } |
| 490 | 490 |
| 491 void WebFrameTestClient::didFinishDocumentLoad(blink::WebLocalFrame* frame) { | 491 void WebFrameTestClient::didFinishDocumentLoad() { |
| 492 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_, web_frame_test_proxy_base_->web_frame()); |
| 495 delegate_->PrintMessage(" - didFinishDocumentLoadForFrame\n"); | 494 delegate_->PrintMessage(" - didFinishDocumentLoadForFrame\n"); |
| 496 } | 495 } |
| 497 } | 496 } |
| 498 | 497 |
| 499 void WebFrameTestClient::didHandleOnloadEvents(blink::WebLocalFrame* frame) { | 498 void WebFrameTestClient::didHandleOnloadEvents(blink::WebLocalFrame* frame) { |
| 500 DCHECK_EQ(frame, web_frame_test_proxy_base_->web_frame()); | 499 DCHECK_EQ(frame, web_frame_test_proxy_base_->web_frame()); |
| 501 if (test_runner()->shouldDumpFrameLoadCallbacks()) { | 500 if (test_runner()->shouldDumpFrameLoadCallbacks()) { |
| 502 PrintFrameDescription(delegate_, frame); | 501 PrintFrameDescription(delegate_, frame); |
| 503 delegate_->PrintMessage(" - didHandleOnloadEventsForFrame\n"); | 502 delegate_->PrintMessage(" - didHandleOnloadEventsForFrame\n"); |
| 504 } | 503 } |
| (...skipping 244 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 |