Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(240)

Side by Side Diff: components/test_runner/test_runner.h

Issue 1847893002: Extract WebFrameClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert some changes to mock_color_chooser.cc + fix counting of TestRunner::chooser_count_. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/test_common.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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>
(...skipping 24 matching lines...) Expand all
35 35
36 namespace gin { 36 namespace gin {
37 class ArrayBufferView; 37 class ArrayBufferView;
38 class Arguments; 38 class Arguments;
39 } 39 }
40 40
41 namespace test_runner { 41 namespace test_runner {
42 42
43 class InvokeCallbackTask; 43 class InvokeCallbackTask;
44 class MockScreenOrientationClient; 44 class MockScreenOrientationClient;
45 class MockWebUserMediaClient;
45 class TestInterfaces; 46 class TestInterfaces;
46 class WebContentSettings; 47 class WebContentSettings;
47 class WebTestDelegate; 48 class WebTestDelegate;
48 class WebTestProxyBase; 49 class WebTestProxyBase;
49 50
50 class TestRunner : public WebTestRunner, 51 class TestRunner : public WebTestRunner,
51 public base::SupportsWeakPtr<TestRunner> { 52 public base::SupportsWeakPtr<TestRunner> {
52 public: 53 public:
53 explicit TestRunner(TestInterfaces*); 54 explicit TestRunner(TestInterfaces*);
54 virtual ~TestRunner(); 55 virtual ~TestRunner();
(...skipping 19 matching lines...) Expand all
74 bool ShouldDumpAsAudio() const override; 75 bool ShouldDumpAsAudio() const override;
75 void GetAudioData(std::vector<unsigned char>* buffer_view) const override; 76 void GetAudioData(std::vector<unsigned char>* buffer_view) const override;
76 bool IsRecursiveLayoutDumpRequested() override; 77 bool IsRecursiveLayoutDumpRequested() override;
77 std::string DumpLayout(blink::WebLocalFrame* frame) override; 78 std::string DumpLayout(blink::WebLocalFrame* frame) override;
78 void ReplicateLayoutTestRuntimeFlagsChanges( 79 void ReplicateLayoutTestRuntimeFlagsChanges(
79 const base::DictionaryValue& changed_values) override; 80 const base::DictionaryValue& changed_values) override;
80 bool HasCustomTextDump(std::string* custom_text_dump) const override; 81 bool HasCustomTextDump(std::string* custom_text_dump) const override;
81 bool ShouldDumpBackForwardList() const override; 82 bool ShouldDumpBackForwardList() const override;
82 blink::WebContentSettingsClient* GetWebContentSettings() const override; 83 blink::WebContentSettingsClient* GetWebContentSettings() const override;
83 84
84 // Methods used by WebTestProxyBase. 85 // Methods used by WebTestProxyBase and WebFrameTestClient.
85 bool shouldStayOnPageAfterHandlingBeforeUnload() const; 86 bool shouldStayOnPageAfterHandlingBeforeUnload() const;
86 MockScreenOrientationClient* getMockScreenOrientationClient(); 87 MockScreenOrientationClient* getMockScreenOrientationClient();
88 MockWebUserMediaClient* getMockWebUserMediaClient();
87 bool shouldDumpSelectionRect() const; 89 bool shouldDumpSelectionRect() const;
88 bool isPrinting() const; 90 bool isPrinting() const;
89 bool shouldDumpAsTextWithPixelResults(); 91 bool shouldDumpAsTextWithPixelResults();
90 bool shouldDumpAsCustomText() const; 92 bool shouldDumpAsCustomText() const;
91 std:: string customDumpText() const; 93 std:: string customDumpText() const;
92 void ShowDevTools(const std::string& settings, 94 void ShowDevTools(const std::string& settings,
93 const std::string& frontend_url); 95 const std::string& frontend_url);
94 void ClearDevToolsLocalStorage(); 96 void ClearDevToolsLocalStorage();
95 void setShouldDumpAsText(bool); 97 void setShouldDumpAsText(bool);
96 void setShouldDumpAsMarkup(bool); 98 void setShouldDumpAsMarkup(bool);
(...skipping 27 matching lines...) Expand all
124 bool shouldDumpResourcePriorities() const; 126 bool shouldDumpResourcePriorities() const;
125 bool RequestPointerLock(); 127 bool RequestPointerLock();
126 void RequestPointerUnlock(); 128 void RequestPointerUnlock();
127 bool isPointerLocked(); 129 bool isPointerLocked();
128 void setToolTipText(const blink::WebString&); 130 void setToolTipText(const blink::WebString&);
129 bool shouldDumpDragImage(); 131 bool shouldDumpDragImage();
130 bool shouldDumpNavigationPolicy() const; 132 bool shouldDumpNavigationPolicy() const;
131 133
132 bool midiAccessorResult(); 134 bool midiAccessorResult();
133 135
136 // Methods used by MockColorChooser:
137 void DidOpenChooser();
138 void DidCloseChooser();
139
134 // A single item in the work queue. 140 // A single item in the work queue.
135 class WorkItem { 141 class WorkItem {
136 public: 142 public:
137 virtual ~WorkItem() {} 143 virtual ~WorkItem() {}
138 144
139 // Returns true if this started a load. 145 // Returns true if this started a load.
140 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0; 146 virtual bool Run(WebTestDelegate*, blink::WebView*) = 0;
141 }; 147 };
142 148
143 private: 149 private:
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
798 804
799 bool pointer_locked_; 805 bool pointer_locked_;
800 enum { 806 enum {
801 PointerLockWillSucceed, 807 PointerLockWillSucceed,
802 PointerLockWillRespondAsync, 808 PointerLockWillRespondAsync,
803 PointerLockWillFailSync, 809 PointerLockWillFailSync,
804 } pointer_lock_planned_result_; 810 } pointer_lock_planned_result_;
805 bool use_mock_theme_; 811 bool use_mock_theme_;
806 812
807 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; 813 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_;
814 scoped_ptr<MockWebUserMediaClient> user_media_client_;
815
816 // Number of currently active color choosers.
817 int chooser_count_;
808 818
809 base::WeakPtrFactory<TestRunner> weak_factory_; 819 base::WeakPtrFactory<TestRunner> weak_factory_;
810 820
811 DISALLOW_COPY_AND_ASSIGN(TestRunner); 821 DISALLOW_COPY_AND_ASSIGN(TestRunner);
812 }; 822 };
813 823
814 } // namespace test_runner 824 } // namespace test_runner
815 825
816 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 826 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « components/test_runner/test_common.cc ('k') | components/test_runner/test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698