| 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 "components/test_runner/web_frame_test_client.h" | 5 #include "components/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 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 | 507 |
| 508 void WebFrameTestClient::didFinishLoad(blink::WebLocalFrame* frame) { | 508 void WebFrameTestClient::didFinishLoad(blink::WebLocalFrame* frame) { |
| 509 if (test_runner_->shouldDumpFrameLoadCallbacks()) { | 509 if (test_runner_->shouldDumpFrameLoadCallbacks()) { |
| 510 PrintFrameDescription(delegate_, frame); | 510 PrintFrameDescription(delegate_, frame); |
| 511 delegate_->PrintMessage(" - didFinishLoadForFrame\n"); | 511 delegate_->PrintMessage(" - didFinishLoadForFrame\n"); |
| 512 } | 512 } |
| 513 } | 513 } |
| 514 | 514 |
| 515 void WebFrameTestClient::didNavigateWithinPage( |
| 516 blink::WebLocalFrame* frame, |
| 517 const blink::WebHistoryItem& history_item, |
| 518 blink::WebHistoryCommitType commit_type, |
| 519 bool contentInitiated) { |
| 520 test_runner_->OnNavigationEnd(); |
| 521 } |
| 522 |
| 523 void WebFrameTestClient::didStartLoading(bool to_different_document) { |
| 524 test_runner_->OnNavigationBegin(web_frame_test_proxy_base_->web_frame()); |
| 525 } |
| 526 |
| 515 void WebFrameTestClient::didStopLoading() { | 527 void WebFrameTestClient::didStopLoading() { |
| 516 test_runner_->tryToClearTopLoadingFrame( | 528 test_runner_->tryToClearTopLoadingFrame( |
| 517 web_frame_test_proxy_base_->web_frame()); | 529 web_frame_test_proxy_base_->web_frame()); |
| 518 } | 530 } |
| 519 | 531 |
| 520 void WebFrameTestClient::didDetectXSS(const blink::WebURL& insecure_url, | 532 void WebFrameTestClient::didDetectXSS(const blink::WebURL& insecure_url, |
| 521 bool did_block_entire_page) { | 533 bool did_block_entire_page) { |
| 522 if (test_runner_->shouldDumpFrameLoadCallbacks()) | 534 if (test_runner_->shouldDumpFrameLoadCallbacks()) |
| 523 delegate_->PrintMessage("didDetectXSS\n"); | 535 delegate_->PrintMessage("didDetectXSS\n"); |
| 524 } | 536 } |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 | 767 |
| 756 bool WebFrameTestClient::runFileChooser( | 768 bool WebFrameTestClient::runFileChooser( |
| 757 const blink::WebFileChooserParams& params, | 769 const blink::WebFileChooserParams& params, |
| 758 blink::WebFileChooserCompletion* completion) { | 770 blink::WebFileChooserCompletion* completion) { |
| 759 delegate_->PrintMessage("Mock: Opening a file chooser.\n"); | 771 delegate_->PrintMessage("Mock: Opening a file chooser.\n"); |
| 760 // FIXME: Add ability to set file names to a file upload control. | 772 // FIXME: Add ability to set file names to a file upload control. |
| 761 return false; | 773 return false; |
| 762 } | 774 } |
| 763 | 775 |
| 764 } // namespace test_runner | 776 } // namespace test_runner |
| OLD | NEW |