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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 void policyDelegateDone(); | 112 void policyDelegateDone(); |
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 | 123 |
123 bool midiAccessorResult(); | 124 bool midiAccessorResult(); |
124 | 125 |
125 // A single item in the work queue. | 126 // A single item in the work queue. |
126 class WorkItem { | 127 class WorkItem { |
127 public: | 128 public: |
128 virtual ~WorkItem() {} | 129 virtual ~WorkItem() {} |
129 | 130 |
130 // Returns true if this started a load. | 131 // Returns true if this started a load. |
131 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; | 132 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 // changes. It takes no arguments, and ignores any that may be present. | 463 // changes. It takes no arguments, and ignores any that may be present. |
463 void DumpResourceRequestPriorities(); | 464 void DumpResourceRequestPriorities(); |
464 | 465 |
465 // Sets a flag to enable the mock theme. | 466 // Sets a flag to enable the mock theme. |
466 void SetUseMockTheme(bool use); | 467 void SetUseMockTheme(bool use); |
467 | 468 |
468 // Sets a flag that causes the test to be marked as completed when the | 469 // Sets a flag that causes the test to be marked as completed when the |
469 // WebFrameClient receives a loadURLExternally() call. | 470 // WebFrameClient receives a loadURLExternally() call. |
470 void WaitUntilExternalURLLoad(); | 471 void WaitUntilExternalURLLoad(); |
471 | 472 |
| 473 // 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 // DumpAsTextWithPixelResults but the pixel results will be the drag image |
| 476 // instead of a snapshot of the page. |
| 477 void DumpDragImage(); |
| 478 |
472 /////////////////////////////////////////////////////////////////////////// | 479 /////////////////////////////////////////////////////////////////////////// |
473 // Methods interacting with the WebTestProxy | 480 // Methods interacting with the WebTestProxy |
474 | 481 |
475 /////////////////////////////////////////////////////////////////////////// | 482 /////////////////////////////////////////////////////////////////////////// |
476 // Methods forwarding to the WebTestDelegate | 483 // Methods forwarding to the WebTestDelegate |
477 | 484 |
478 // Shows DevTools window. | 485 // Shows DevTools window. |
479 void ShowWebInspector(const std::string& str, | 486 void ShowWebInspector(const std::string& str, |
480 const std::string& frontend_url); | 487 const std::string& frontend_url); |
481 void CloseWebInspector(); | 488 void CloseWebInspector(); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 bool dump_spell_check_callbacks_; | 739 bool dump_spell_check_callbacks_; |
733 | 740 |
734 // If true, the test_shell will produce a dump of the back forward list as | 741 // If true, the test_shell will produce a dump of the back forward list as |
735 // well. | 742 // well. |
736 bool dump_back_forward_list_; | 743 bool dump_back_forward_list_; |
737 | 744 |
738 // If true, the test_shell will draw the bounds of the current selection rect | 745 // If true, the test_shell will draw the bounds of the current selection rect |
739 // taking possible transforms of the selection rect into account. | 746 // taking possible transforms of the selection rect into account. |
740 bool dump_selection_rect_; | 747 bool dump_selection_rect_; |
741 | 748 |
| 749 // If true, the test_shell will dump the drag image as pixel results. |
| 750 bool dump_drag_image_; |
| 751 |
742 // If true, pixel dump will be produced as a series of 1px-tall, view-wide | 752 // If true, pixel dump will be produced as a series of 1px-tall, view-wide |
743 // individual paints over the height of the view. | 753 // individual paints over the height of the view. |
744 bool test_repaint_; | 754 bool test_repaint_; |
745 | 755 |
746 // If true and test_repaint_ is true as well, pixel dump will be produced as | 756 // If true and test_repaint_ is true as well, pixel dump will be produced as |
747 // a series of 1px-wide, view-tall paints across the width of the view. | 757 // a series of 1px-wide, view-tall paints across the width of the view. |
748 bool sweep_horizontally_; | 758 bool sweep_horizontally_; |
749 | 759 |
750 // If true, layout is to target printed pages. | 760 // If true, layout is to target printed pages. |
751 bool is_printing_; | 761 bool is_printing_; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
789 bool use_mock_theme_; | 799 bool use_mock_theme_; |
790 | 800 |
791 base::WeakPtrFactory<TestRunner> weak_factory_; | 801 base::WeakPtrFactory<TestRunner> weak_factory_; |
792 | 802 |
793 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 803 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
794 }; | 804 }; |
795 | 805 |
796 } // namespace content | 806 } // namespace content |
797 | 807 |
798 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ | 808 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |