| 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 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
| 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 bool policyDelegateEnabled() const; | 113 bool policyDelegateEnabled() const; |
| 114 bool policyDelegateIsPermissive() const; | 114 bool policyDelegateIsPermissive() const; |
| 115 bool policyDelegateShouldNotifyDone() const; | 115 bool policyDelegateShouldNotifyDone() const; |
| 116 bool shouldInterceptPostMessage() const; | 116 bool shouldInterceptPostMessage() const; |
| 117 bool shouldDumpResourcePriorities() const; | 117 bool shouldDumpResourcePriorities() const; |
| 118 bool RequestPointerLock(); | 118 bool RequestPointerLock(); |
| 119 void RequestPointerUnlock(); | 119 void RequestPointerUnlock(); |
| 120 bool isPointerLocked(); | 120 bool isPointerLocked(); |
| 121 void setToolTipText(const blink::WebString&); | 121 void setToolTipText(const blink::WebString&); |
| 122 bool shouldDumpDragImage(); | 122 bool shouldDumpDragImage(); |
| 123 bool shouldDumpNavigationPolicy() const; |
| 123 | 124 |
| 124 bool midiAccessorResult(); | 125 bool midiAccessorResult(); |
| 125 | 126 |
| 126 // A single item in the work queue. | 127 // A single item in the work queue. |
| 127 class WorkItem { | 128 class WorkItem { |
| 128 public: | 129 public: |
| 129 virtual ~WorkItem() {} | 130 virtual ~WorkItem() {} |
| 130 | 131 |
| 131 // Returns true if this started a load. | 132 // Returns true if this started a load. |
| 132 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; | 133 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 469 // Sets a flag that causes the test to be marked as completed when the | 470 // Sets a flag that causes the test to be marked as completed when the |
| 470 // WebFrameClient receives a loadURLExternally() call. | 471 // WebFrameClient receives a loadURLExternally() call. |
| 471 void WaitUntilExternalURLLoad(); | 472 void WaitUntilExternalURLLoad(); |
| 472 | 473 |
| 473 // This function sets a flag which tells the WebTestProxy to dump the drag | 474 // This function sets a flag which tells the WebTestProxy to dump the drag |
| 474 // image when the next drag-and-drop is initiated. It is equivalent to | 475 // image when the next drag-and-drop is initiated. It is equivalent to |
| 475 // DumpAsTextWithPixelResults but the pixel results will be the drag image | 476 // DumpAsTextWithPixelResults but the pixel results will be the drag image |
| 476 // instead of a snapshot of the page. | 477 // instead of a snapshot of the page. |
| 477 void DumpDragImage(); | 478 void DumpDragImage(); |
| 478 | 479 |
| 480 // Sets a flag that tells the WebTestProxy to dump the default navigation |
| 481 // policy passed to the decidePolicyForNavigation callback. |
| 482 void DumpNavigationPolicy(); |
| 483 |
| 479 /////////////////////////////////////////////////////////////////////////// | 484 /////////////////////////////////////////////////////////////////////////// |
| 480 // Methods interacting with the WebTestProxy | 485 // Methods interacting with the WebTestProxy |
| 481 | 486 |
| 482 /////////////////////////////////////////////////////////////////////////// | 487 /////////////////////////////////////////////////////////////////////////// |
| 483 // Methods forwarding to the WebTestDelegate | 488 // Methods forwarding to the WebTestDelegate |
| 484 | 489 |
| 485 // Shows DevTools window. | 490 // Shows DevTools window. |
| 486 void ShowWebInspector(const std::string& str, | 491 void ShowWebInspector(const std::string& str, |
| 487 const std::string& frontend_url); | 492 const std::string& frontend_url); |
| 488 void CloseWebInspector(); | 493 void CloseWebInspector(); |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 // well. | 747 // well. |
| 743 bool dump_back_forward_list_; | 748 bool dump_back_forward_list_; |
| 744 | 749 |
| 745 // If true, the test_shell will draw the bounds of the current selection rect | 750 // If true, the test_shell will draw the bounds of the current selection rect |
| 746 // taking possible transforms of the selection rect into account. | 751 // taking possible transforms of the selection rect into account. |
| 747 bool dump_selection_rect_; | 752 bool dump_selection_rect_; |
| 748 | 753 |
| 749 // If true, the test_shell will dump the drag image as pixel results. | 754 // If true, the test_shell will dump the drag image as pixel results. |
| 750 bool dump_drag_image_; | 755 bool dump_drag_image_; |
| 751 | 756 |
| 757 // If true, content_shell will dump the default navigation policy passed to |
| 758 // WebFrameClient::decidePolicyForNavigation. |
| 759 bool dump_navigation_policy_; |
| 760 |
| 752 // If true, pixel dump will be produced as a series of 1px-tall, view-wide | 761 // If true, pixel dump will be produced as a series of 1px-tall, view-wide |
| 753 // individual paints over the height of the view. | 762 // individual paints over the height of the view. |
| 754 bool test_repaint_; | 763 bool test_repaint_; |
| 755 | 764 |
| 756 // If true and test_repaint_ is true as well, pixel dump will be produced as | 765 // If true and test_repaint_ is true as well, pixel dump will be produced as |
| 757 // a series of 1px-wide, view-tall paints across the width of the view. | 766 // a series of 1px-wide, view-tall paints across the width of the view. |
| 758 bool sweep_horizontally_; | 767 bool sweep_horizontally_; |
| 759 | 768 |
| 760 // If true, layout is to target printed pages. | 769 // If true, layout is to target printed pages. |
| 761 bool is_printing_; | 770 bool is_printing_; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 bool use_mock_theme_; | 808 bool use_mock_theme_; |
| 800 | 809 |
| 801 base::WeakPtrFactory<TestRunner> weak_factory_; | 810 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 802 | 811 |
| 803 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 812 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 804 }; | 813 }; |
| 805 | 814 |
| 806 } // namespace content | 815 } // namespace content |
| 807 | 816 |
| 808 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 817 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |