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 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 } | 504 } |
505 } | 505 } |
506 | 506 |
507 void WebFrameTestClient::didFinishLoad(blink::WebLocalFrame* frame) { | 507 void WebFrameTestClient::didFinishLoad(blink::WebLocalFrame* frame) { |
508 if (test_runner_->shouldDumpFrameLoadCallbacks()) { | 508 if (test_runner_->shouldDumpFrameLoadCallbacks()) { |
509 PrintFrameDescription(delegate_, frame); | 509 PrintFrameDescription(delegate_, frame); |
510 delegate_->PrintMessage(" - didFinishLoadForFrame\n"); | 510 delegate_->PrintMessage(" - didFinishLoadForFrame\n"); |
511 } | 511 } |
512 } | 512 } |
513 | 513 |
514 void WebFrameTestClient::didNavigateWithinPage( | |
515 blink::WebLocalFrame* frame, | |
516 const blink::WebHistoryItem& history_item, | |
517 blink::WebHistoryCommitType commit_type, | |
518 bool contentInitiated) { | |
519 test_runner_->OnNavigationEnd(); | |
clamy
2016/07/27 16:57:05
Based on what we discussed offline, do you still n
blundell
2016/07/29 15:02:46
Yes, it's needed: there is at least one test where
| |
520 } | |
521 | |
522 void WebFrameTestClient::didStartLoading(bool to_different_document) { | |
523 test_runner_->OnNavigationBegin(); | |
524 } | |
525 | |
514 void WebFrameTestClient::didStopLoading() { | 526 void WebFrameTestClient::didStopLoading() { |
515 test_runner_->tryToClearTopLoadingFrame( | 527 test_runner_->tryToClearTopLoadingFrame( |
516 web_frame_test_proxy_base_->web_frame()); | 528 web_frame_test_proxy_base_->web_frame()); |
517 } | 529 } |
518 | 530 |
519 void WebFrameTestClient::didDetectXSS(const blink::WebURL& insecure_url, | 531 void WebFrameTestClient::didDetectXSS(const blink::WebURL& insecure_url, |
520 bool did_block_entire_page) { | 532 bool did_block_entire_page) { |
521 if (test_runner_->shouldDumpFrameLoadCallbacks()) | 533 if (test_runner_->shouldDumpFrameLoadCallbacks()) |
522 delegate_->PrintMessage("didDetectXSS\n"); | 534 delegate_->PrintMessage("didDetectXSS\n"); |
523 } | 535 } |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
754 | 766 |
755 bool WebFrameTestClient::runFileChooser( | 767 bool WebFrameTestClient::runFileChooser( |
756 const blink::WebFileChooserParams& params, | 768 const blink::WebFileChooserParams& params, |
757 blink::WebFileChooserCompletion* completion) { | 769 blink::WebFileChooserCompletion* completion) { |
758 delegate_->PrintMessage("Mock: Opening a file chooser.\n"); | 770 delegate_->PrintMessage("Mock: Opening a file chooser.\n"); |
759 // FIXME: Add ability to set file names to a file upload control. | 771 // FIXME: Add ability to set file names to a file upload control. |
760 return false; | 772 return false; |
761 } | 773 } |
762 | 774 |
763 } // namespace test_runner | 775 } // namespace test_runner |
OLD | NEW |