OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/test_runner.h" | 5 #include "components/test_runner/test_runner.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "components/test_runner/mock_credential_manager_client.h" | 10 #include "components/test_runner/mock_credential_manager_client.h" |
(...skipping 1763 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1774 void TestRunner::setCustomTextOutput(std::string text) { | 1774 void TestRunner::setCustomTextOutput(std::string text) { |
1775 custom_text_output_ = text; | 1775 custom_text_output_ = text; |
1776 has_custom_text_output_ = true; | 1776 has_custom_text_output_ = true; |
1777 } | 1777 } |
1778 | 1778 |
1779 bool TestRunner::ShouldGeneratePixelResults() { | 1779 bool TestRunner::ShouldGeneratePixelResults() { |
1780 CheckResponseMimeType(); | 1780 CheckResponseMimeType(); |
1781 return generate_pixel_results_; | 1781 return generate_pixel_results_; |
1782 } | 1782 } |
1783 | 1783 |
| 1784 bool TestRunner::ShouldStayOnPageAfterHandlingBeforeUnload() const { |
| 1785 return should_stay_on_page_after_handling_before_unload_; |
| 1786 } |
| 1787 |
| 1788 |
1784 void TestRunner::setShouldGeneratePixelResults(bool value) { | 1789 void TestRunner::setShouldGeneratePixelResults(bool value) { |
1785 generate_pixel_results_ = value; | 1790 generate_pixel_results_ = value; |
1786 } | 1791 } |
1787 | 1792 |
1788 bool TestRunner::shouldDumpChildFrameScrollPositions() const { | 1793 bool TestRunner::shouldDumpChildFrameScrollPositions() const { |
1789 return dump_child_frame_scroll_positions_; | 1794 return dump_child_frame_scroll_positions_; |
1790 } | 1795 } |
1791 | 1796 |
1792 bool TestRunner::shouldDumpChildFramesAsMarkup() const { | 1797 bool TestRunner::shouldDumpChildFramesAsMarkup() const { |
1793 return dump_child_frames_as_markup_; | 1798 return dump_child_frames_as_markup_; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 } | 1883 } |
1879 | 1884 |
1880 bool TestRunner::shouldDumpSelectionRect() const { | 1885 bool TestRunner::shouldDumpSelectionRect() const { |
1881 return dump_selection_rect_; | 1886 return dump_selection_rect_; |
1882 } | 1887 } |
1883 | 1888 |
1884 bool TestRunner::isPrinting() const { | 1889 bool TestRunner::isPrinting() const { |
1885 return is_printing_; | 1890 return is_printing_; |
1886 } | 1891 } |
1887 | 1892 |
1888 bool TestRunner::shouldStayOnPageAfterHandlingBeforeUnload() const { | |
1889 return should_stay_on_page_after_handling_before_unload_; | |
1890 } | |
1891 | |
1892 bool TestRunner::shouldWaitUntilExternalURLLoad() const { | 1893 bool TestRunner::shouldWaitUntilExternalURLLoad() const { |
1893 return wait_until_external_url_load_; | 1894 return wait_until_external_url_load_; |
1894 } | 1895 } |
1895 | 1896 |
1896 const std::set<std::string>* TestRunner::httpHeadersToClear() const { | 1897 const std::set<std::string>* TestRunner::httpHeadersToClear() const { |
1897 return &http_headers_to_clear_; | 1898 return &http_headers_to_clear_; |
1898 } | 1899 } |
1899 | 1900 |
1900 void TestRunner::setTopLoadingFrame(WebFrame* frame, bool clear) { | 1901 void TestRunner::setTopLoadingFrame(WebFrame* frame, bool clear) { |
1901 if (frame->top()->view() != web_view_) | 1902 if (frame->top()->view() != web_view_) |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3088 } | 3089 } |
3089 | 3090 |
3090 void TestRunner::DidLosePointerLockInternal() { | 3091 void TestRunner::DidLosePointerLockInternal() { |
3091 bool was_locked = pointer_locked_; | 3092 bool was_locked = pointer_locked_; |
3092 pointer_locked_ = false; | 3093 pointer_locked_ = false; |
3093 if (was_locked) | 3094 if (was_locked) |
3094 web_view_->didLosePointerLock(); | 3095 web_view_->didLosePointerLock(); |
3095 } | 3096 } |
3096 | 3097 |
3097 } // namespace test_runner | 3098 } // namespace test_runner |
OLD | NEW |