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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.h

Issue 2670573002: Revert of Replace IPC messages in layout_test_render_frame_observer. (Closed)
Patch Set: Created 3 years, 10 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ 5 #ifndef CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_
6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ 6 #define CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/files/file_path.h" 13 #include "base/files/file_path.h"
14 #include "base/macros.h" 14 #include "base/macros.h"
15 #include "components/test_runner/test_preferences.h" 15 #include "components/test_runner/test_preferences.h"
16 #include "components/test_runner/web_test_delegate.h" 16 #include "components/test_runner/web_test_delegate.h"
17 #include "content/public/common/page_state.h" 17 #include "content/public/common/page_state.h"
18 #include "content/public/renderer/render_view_observer.h" 18 #include "content/public/renderer/render_view_observer.h"
19 #include "content/public/renderer/render_view_observer_tracker.h" 19 #include "content/public/renderer/render_view_observer_tracker.h"
20 #include "content/shell/common/layout_test.mojom.h"
21 #include "content/shell/common/layout_test/layout_test_bluetooth_fake_adapter_se tter.mojom.h" 20 #include "content/shell/common/layout_test/layout_test_bluetooth_fake_adapter_se tter.mojom.h"
21 #include "content/shell/common/shell_test_configuration.h"
22 #include "v8/include/v8.h" 22 #include "v8/include/v8.h"
23 23
24 class SkBitmap; 24 class SkBitmap;
25 25
26 namespace base { 26 namespace base {
27 class DictionaryValue; 27 class DictionaryValue;
28 } 28 }
29 29
30 namespace blink { 30 namespace blink {
31 class WebDeviceMotionData; 31 class WebDeviceMotionData;
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 // Resets a RenderView to a known state for layout tests. It is used both when 166 // Resets a RenderView to a known state for layout tests. It is used both when
167 // a RenderView is created and when reusing an existing RenderView for the 167 // a RenderView is created and when reusing an existing RenderView for the
168 // next test case. 168 // next test case.
169 // When reusing an existing RenderView, |for_new_test| should be true, which 169 // When reusing an existing RenderView, |for_new_test| should be true, which
170 // also resets additional state, like the main frame's name and opener. 170 // also resets additional state, like the main frame's name and opener.
171 void Reset(bool for_new_test); 171 void Reset(bool for_new_test);
172 172
173 void ReportLeakDetectionResult(const LeakDetectionResult& result); 173 void ReportLeakDetectionResult(const LeakDetectionResult& result);
174 174
175 // Message handlers forwarded by LayoutTestRenderFrameObserver. 175 // Message handlers forwarded by LayoutTestRenderFrameObserver.
176 void OnSetTestConfiguration(mojom::ShellTestConfigurationPtr params); 176 void OnSetTestConfiguration(const ShellTestConfiguration& params);
177 void OnReplicateTestConfiguration(mojom::ShellTestConfigurationPtr params); 177 void OnReplicateTestConfiguration(const ShellTestConfiguration& params);
178 void OnSetupSecondaryRenderer(); 178 void OnSetupSecondaryRenderer();
179 179
180 private: 180 private:
181 // Message handlers. 181 // Message handlers.
182 void OnSessionHistory( 182 void OnSessionHistory(
183 const std::vector<int>& routing_ids, 183 const std::vector<int>& routing_ids,
184 const std::vector<std::vector<PageState> >& session_histories, 184 const std::vector<std::vector<PageState> >& session_histories,
185 const std::vector<unsigned>& current_entry_indexes); 185 const std::vector<unsigned>& current_entry_indexes);
186 void OnReset(); 186 void OnReset();
187 void OnTestFinishedInSecondaryRenderer(); 187 void OnTestFinishedInSecondaryRenderer();
(...skipping 12 matching lines...) Expand all
200 void OnPixelsDumpCompleted(const SkBitmap& snapshot); 200 void OnPixelsDumpCompleted(const SkBitmap& snapshot);
201 void CaptureDumpComplete(); 201 void CaptureDumpComplete();
202 std::string DumpHistoryForWindow(blink::WebView* web_view); 202 std::string DumpHistoryForWindow(blink::WebView* web_view);
203 203
204 mojom::LayoutTestBluetoothFakeAdapterSetter& 204 mojom::LayoutTestBluetoothFakeAdapterSetter&
205 GetBluetoothFakeAdapterSetter(); 205 GetBluetoothFakeAdapterSetter();
206 mojom::LayoutTestBluetoothFakeAdapterSetterPtr bluetooth_fake_adapter_setter_; 206 mojom::LayoutTestBluetoothFakeAdapterSetterPtr bluetooth_fake_adapter_setter_;
207 207
208 test_runner::TestPreferences prefs_; 208 test_runner::TestPreferences prefs_;
209 209
210 mojom::ShellTestConfigurationPtr test_config_; 210 ShellTestConfiguration test_config_;
211 211
212 std::vector<int> routing_ids_; 212 std::vector<int> routing_ids_;
213 std::vector<std::vector<PageState> > session_histories_; 213 std::vector<std::vector<PageState> > session_histories_;
214 std::vector<unsigned> current_entry_indexes_; 214 std::vector<unsigned> current_entry_indexes_;
215 215
216 std::deque<base::Callback<void(const std::vector<std::string>&)>> 216 std::deque<base::Callback<void(const std::vector<std::string>&)>>
217 get_bluetooth_events_callbacks_; 217 get_bluetooth_events_callbacks_;
218 218
219 bool is_main_window_; 219 bool is_main_window_;
220 220
221 bool focus_on_next_commit_; 221 bool focus_on_next_commit_;
222 222
223 std::unique_ptr<test_runner::AppBannerService> app_banner_service_; 223 std::unique_ptr<test_runner::AppBannerService> app_banner_service_;
224 224
225 std::unique_ptr<LeakDetector> leak_detector_; 225 std::unique_ptr<LeakDetector> leak_detector_;
226 226
227 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner); 227 DISALLOW_COPY_AND_ASSIGN(BlinkTestRunner);
228 }; 228 };
229 229
230 } // namespace content 230 } // namespace content
231 231
232 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_ 232 #endif // CONTENT_SHELL_RENDERER_LAYOUT_TEST_BLINK_TEST_RUNNER_H_
OLDNEW
« no previous file with comments | « content/shell/common/shell_test_configuration.cc ('k') | content/shell/renderer/layout_test/blink_test_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698