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