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

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

Issue 1821923003: Extract WebFrameClient implementation out of WebTestProxyBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing... 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
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 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 816
811 bool pointer_locked_; 817 bool pointer_locked_;
812 enum { 818 enum {
813 PointerLockWillSucceed, 819 PointerLockWillSucceed,
814 PointerLockWillRespondAsync, 820 PointerLockWillRespondAsync,
815 PointerLockWillFailSync, 821 PointerLockWillFailSync,
816 } pointer_lock_planned_result_; 822 } pointer_lock_planned_result_;
817 bool use_mock_theme_; 823 bool use_mock_theme_;
818 824
819 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_; 825 scoped_ptr<MockScreenOrientationClient> mock_screen_orientation_client_;
826 scoped_ptr<MockWebUserMediaClient> user_media_client_;
827
828 // Number of currently active color choosers.
829 int chooser_count_;
820 830
821 base::WeakPtrFactory<TestRunner> weak_factory_; 831 base::WeakPtrFactory<TestRunner> weak_factory_;
822 832
823 DISALLOW_COPY_AND_ASSIGN(TestRunner); 833 DISALLOW_COPY_AND_ASSIGN(TestRunner);
824 }; 834 };
825 835
826 } // namespace test_runner 836 } // namespace test_runner
827 837
828 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ 838 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698