| 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 COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <deque> | 10 #include <deque> |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/macros.h" | 15 #include "base/macros.h" |
| 16 #include "base/memory/scoped_ptr.h" | 16 #include "base/memory/scoped_ptr.h" |
| 17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
| 18 #include "components/test_runner/layout_dump_flags.h" |
| 18 #include "components/test_runner/test_runner_export.h" | 19 #include "components/test_runner/test_runner_export.h" |
| 19 #include "components/test_runner/web_task.h" | 20 #include "components/test_runner/web_task.h" |
| 20 #include "components/test_runner/web_test_runner.h" | 21 #include "components/test_runner/web_test_runner.h" |
| 21 #include "v8/include/v8.h" | 22 #include "v8/include/v8.h" |
| 22 | 23 |
| 23 class GURL; | 24 class GURL; |
| 24 class SkBitmap; | 25 class SkBitmap; |
| 25 | 26 |
| 26 namespace blink { | 27 namespace blink { |
| 27 class WebContentSettingsClient; | 28 class WebContentSettingsClient; |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 | 66 |
| 66 bool UseMockTheme() const { return use_mock_theme_; } | 67 bool UseMockTheme() const { return use_mock_theme_; } |
| 67 | 68 |
| 68 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); | 69 void InvokeCallback(scoped_ptr<InvokeCallbackTask> callback); |
| 69 | 70 |
| 70 // WebTestRunner implementation. | 71 // WebTestRunner implementation. |
| 71 bool ShouldGeneratePixelResults() override; | 72 bool ShouldGeneratePixelResults() override; |
| 72 bool ShouldStayOnPageAfterHandlingBeforeUnload() const override; | 73 bool ShouldStayOnPageAfterHandlingBeforeUnload() const override; |
| 73 bool ShouldDumpAsAudio() const override; | 74 bool ShouldDumpAsAudio() const override; |
| 74 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; | 75 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; |
| 75 LayoutDumpFlags GetLayoutDumpFlags() override; | 76 const LayoutDumpFlags& GetLayoutDumpFlags() override; |
| 76 bool HasCustomTextDump(std::string* custom_text_dump) const override; | 77 bool HasCustomTextDump(std::string* custom_text_dump) const override; |
| 77 bool ShouldDumpBackForwardList() const override; | 78 bool ShouldDumpBackForwardList() const override; |
| 78 blink::WebContentSettingsClient* GetWebContentSettings() const override; | 79 blink::WebContentSettingsClient* GetWebContentSettings() const override; |
| 79 | 80 |
| 80 // Methods used by WebTestProxyBase. | 81 // Methods used by WebTestProxyBase. |
| 81 bool shouldDumpSelectionRect() const; | 82 bool shouldDumpSelectionRect() const; |
| 82 bool isPrinting() const; | 83 bool isPrinting() const; |
| 83 bool shouldDumpAsText(); | |
| 84 bool shouldDumpAsTextWithPixelResults(); | 84 bool shouldDumpAsTextWithPixelResults(); |
| 85 bool shouldDumpAsCustomText() const; | 85 bool shouldDumpAsCustomText() const; |
| 86 std:: string customDumpText() const; | 86 std:: string customDumpText() const; |
| 87 bool shouldDumpAsMarkup(); | |
| 88 bool shouldDumpChildFrameScrollPositions() const; | |
| 89 bool shouldDumpChildFramesAsMarkup() const; | |
| 90 bool shouldDumpChildFramesAsText() const; | |
| 91 void ShowDevTools(const std::string& settings, | 87 void ShowDevTools(const std::string& settings, |
| 92 const std::string& frontend_url); | 88 const std::string& frontend_url); |
| 93 void ClearDevToolsLocalStorage(); | 89 void ClearDevToolsLocalStorage(); |
| 94 void setShouldDumpAsText(bool); | 90 void setShouldDumpAsText(bool); |
| 95 void setShouldDumpAsMarkup(bool); | 91 void setShouldDumpAsMarkup(bool); |
| 96 void setCustomTextOutput(const std::string& text); | 92 void setCustomTextOutput(const std::string& text); |
| 97 void setShouldGeneratePixelResults(bool); | 93 void setShouldGeneratePixelResults(bool); |
| 98 void setShouldDumpFrameLoadCallbacks(bool); | 94 void setShouldDumpFrameLoadCallbacks(bool); |
| 99 void setShouldDumpPingLoaderCallbacks(bool); | 95 void setShouldDumpPingLoaderCallbacks(bool); |
| 100 void setShouldEnableViewSource(bool); | 96 void setShouldEnableViewSource(bool); |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 706 // Bound variable to set whether postMessages should be intercepted or not | 702 // Bound variable to set whether postMessages should be intercepted or not |
| 707 bool intercept_post_message_; | 703 bool intercept_post_message_; |
| 708 | 704 |
| 709 // If true, the test_shell will write a descriptive line for each editing | 705 // If true, the test_shell will write a descriptive line for each editing |
| 710 // command. | 706 // command. |
| 711 bool dump_editting_callbacks_; | 707 bool dump_editting_callbacks_; |
| 712 | 708 |
| 713 // If true, the test_shell will generate pixel results in DumpAsText mode | 709 // If true, the test_shell will generate pixel results in DumpAsText mode |
| 714 bool generate_pixel_results_; | 710 bool generate_pixel_results_; |
| 715 | 711 |
| 716 // If true, the test_shell will produce a plain text dump rather than a | 712 // Flags controlling what content gets dumped as a layout text result. |
| 717 // text representation of the renderer. | 713 LayoutDumpFlags layout_dump_flags_; |
| 718 bool dump_as_text_; | |
| 719 | |
| 720 // If true and if dump_as_text_ is true, the test_shell will recursively | |
| 721 // dump all frames as plain text. | |
| 722 bool dump_child_frames_as_text_; | |
| 723 | |
| 724 // If true, the test_shell will produce a dump of the DOM rather than a text | |
| 725 // representation of the renderer. | |
| 726 bool dump_as_markup_; | |
| 727 | |
| 728 // If true and if dump_as_markup_ is true, the test_shell will recursively | |
| 729 // produce a dump of the DOM rather than a text representation of the | |
| 730 // renderer. | |
| 731 bool dump_child_frames_as_markup_; | |
| 732 | |
| 733 // If true, the test_shell will print out the child frame scroll offsets as | |
| 734 // well. | |
| 735 bool dump_child_frame_scroll_positions_; | |
| 736 | 714 |
| 737 // If true, the test_shell will print out the icon change notifications. | 715 // If true, the test_shell will print out the icon change notifications. |
| 738 bool dump_icon_changes_; | 716 bool dump_icon_changes_; |
| 739 | 717 |
| 740 // If true, the test_shell will output a base64 encoded WAVE file. | 718 // If true, the test_shell will output a base64 encoded WAVE file. |
| 741 bool dump_as_audio_; | 719 bool dump_as_audio_; |
| 742 | 720 |
| 743 // If true, the test_shell will output a descriptive line for each frame | 721 // If true, the test_shell will output a descriptive line for each frame |
| 744 // load callback. | 722 // load callback. |
| 745 bool dump_frame_load_callbacks_; | 723 bool dump_frame_load_callbacks_; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 799 bool dump_navigation_policy_; | 777 bool dump_navigation_policy_; |
| 800 | 778 |
| 801 // If true, pixel dump will be produced as a series of 1px-tall, view-wide | 779 // If true, pixel dump will be produced as a series of 1px-tall, view-wide |
| 802 // individual paints over the height of the view. | 780 // individual paints over the height of the view. |
| 803 bool test_repaint_; | 781 bool test_repaint_; |
| 804 | 782 |
| 805 // If true and test_repaint_ is true as well, pixel dump will be produced as | 783 // If true and test_repaint_ is true as well, pixel dump will be produced as |
| 806 // a series of 1px-wide, view-tall paints across the width of the view. | 784 // a series of 1px-wide, view-tall paints across the width of the view. |
| 807 bool sweep_horizontally_; | 785 bool sweep_horizontally_; |
| 808 | 786 |
| 809 // If true, layout is to target printed pages. | |
| 810 bool is_printing_; | |
| 811 | |
| 812 // If false, MockWebMIDIAccessor fails on startSession() for testing. | 787 // If false, MockWebMIDIAccessor fails on startSession() for testing. |
| 813 bool midi_accessor_result_; | 788 bool midi_accessor_result_; |
| 814 | 789 |
| 815 bool should_stay_on_page_after_handling_before_unload_; | 790 bool should_stay_on_page_after_handling_before_unload_; |
| 816 | 791 |
| 817 bool should_dump_resource_priorities_; | 792 bool should_dump_resource_priorities_; |
| 818 | 793 |
| 819 bool has_custom_text_output_; | 794 bool has_custom_text_output_; |
| 820 std::string custom_text_output_; | 795 std::string custom_text_output_; |
| 821 | 796 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 847 bool use_mock_theme_; | 822 bool use_mock_theme_; |
| 848 | 823 |
| 849 base::WeakPtrFactory<TestRunner> weak_factory_; | 824 base::WeakPtrFactory<TestRunner> weak_factory_; |
| 850 | 825 |
| 851 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 826 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
| 852 }; | 827 }; |
| 853 | 828 |
| 854 } // namespace test_runner | 829 } // namespace test_runner |
| 855 | 830 |
| 856 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 831 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ |
| OLD | NEW |