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 CONTENT_SHELL_TEST_RUNNER_TEST_RUNNER_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 6 #define CONTENT_SHELL_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 <memory> | 11 #include <memory> |
12 #include <set> | 12 #include <set> |
13 #include <string> | 13 #include <string> |
14 #include <vector> | 14 #include <vector> |
15 | 15 |
16 #include "base/macros.h" | 16 #include "base/macros.h" |
17 #include "base/memory/weak_ptr.h" | 17 #include "base/memory/weak_ptr.h" |
18 #include "components/test_runner/layout_test_runtime_flags.h" | 18 #include "content/shell/test_runner/layout_test_runtime_flags.h" |
19 #include "components/test_runner/test_runner_export.h" | 19 #include "content/shell/test_runner/test_runner_export.h" |
20 #include "components/test_runner/web_test_runner.h" | 20 #include "content/shell/test_runner/web_test_runner.h" |
21 #include "media/midi/midi_service.mojom.h" | 21 #include "media/midi/midi_service.mojom.h" |
22 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" | 22 #include "third_party/WebKit/public/platform/WebEffectiveConnectionType.h" |
23 #include "third_party/WebKit/public/platform/WebImage.h" | 23 #include "third_party/WebKit/public/platform/WebImage.h" |
24 #include "v8/include/v8.h" | 24 #include "v8/include/v8.h" |
25 | 25 |
26 class GURL; | 26 class GURL; |
27 class SkBitmap; | 27 class SkBitmap; |
28 | 28 |
29 namespace base { | 29 namespace base { |
30 class NullableString16; | 30 class NullableString16; |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 // Methods used by WebViewTestClient and WebFrameTestClient. | 106 // Methods used by WebViewTestClient and WebFrameTestClient. |
107 void OnNavigationBegin(blink::WebFrame* frame); | 107 void OnNavigationBegin(blink::WebFrame* frame); |
108 void OnNavigationEnd() { will_navigate_ = false; } | 108 void OnNavigationEnd() { will_navigate_ = false; } |
109 std::string GetAcceptLanguages() const; | 109 std::string GetAcceptLanguages() const; |
110 bool shouldStayOnPageAfterHandlingBeforeUnload() const; | 110 bool shouldStayOnPageAfterHandlingBeforeUnload() const; |
111 MockScreenOrientationClient* getMockScreenOrientationClient(); | 111 MockScreenOrientationClient* getMockScreenOrientationClient(); |
112 MockWebUserMediaClient* getMockWebUserMediaClient(); | 112 MockWebUserMediaClient* getMockWebUserMediaClient(); |
113 MockWebSpeechRecognizer* getMockWebSpeechRecognizer(); | 113 MockWebSpeechRecognizer* getMockWebSpeechRecognizer(); |
114 bool isPrinting() const; | 114 bool isPrinting() const; |
115 bool shouldDumpAsCustomText() const; | 115 bool shouldDumpAsCustomText() const; |
116 std:: string customDumpText() const; | 116 std::string customDumpText() const; |
117 void ShowDevTools(const std::string& settings, | 117 void ShowDevTools(const std::string& settings, |
118 const std::string& frontend_url); | 118 const std::string& frontend_url); |
119 void ClearDevToolsLocalStorage(); | 119 void ClearDevToolsLocalStorage(); |
120 void SetV8CacheDisabled(bool); | 120 void SetV8CacheDisabled(bool); |
121 void setShouldDumpAsText(bool); | 121 void setShouldDumpAsText(bool); |
122 void setShouldDumpAsMarkup(bool); | 122 void setShouldDumpAsMarkup(bool); |
123 void setCustomTextOutput(const std::string& text); | 123 void setCustomTextOutput(const std::string& text); |
124 void setShouldGeneratePixelResults(bool); | 124 void setShouldGeneratePixelResults(bool); |
125 void setShouldDumpFrameLoadCallbacks(bool); | 125 void setShouldDumpFrameLoadCallbacks(bool); |
126 void setShouldEnableViewSource(bool); | 126 void setShouldEnableViewSource(bool); |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
279 | 279 |
280 bool EnableAutoResizeMode(int min_width, | 280 bool EnableAutoResizeMode(int min_width, |
281 int min_height, | 281 int min_height, |
282 int max_width, | 282 int max_width, |
283 int max_height); | 283 int max_height); |
284 bool DisableAutoResizeMode(int new_width, int new_height); | 284 bool DisableAutoResizeMode(int new_width, int new_height); |
285 | 285 |
286 void SetMockDeviceLight(double value); | 286 void SetMockDeviceLight(double value); |
287 void ResetDeviceLight(); | 287 void ResetDeviceLight(); |
288 // Device Motion / Device Orientation related functions | 288 // Device Motion / Device Orientation related functions |
289 void SetMockDeviceMotion(bool has_acceleration_x, double acceleration_x, | 289 void SetMockDeviceMotion(bool has_acceleration_x, |
290 bool has_acceleration_y, double acceleration_y, | 290 double acceleration_x, |
291 bool has_acceleration_z, double acceleration_z, | 291 bool has_acceleration_y, |
| 292 double acceleration_y, |
| 293 bool has_acceleration_z, |
| 294 double acceleration_z, |
292 bool has_acceleration_including_gravity_x, | 295 bool has_acceleration_including_gravity_x, |
293 double acceleration_including_gravity_x, | 296 double acceleration_including_gravity_x, |
294 bool has_acceleration_including_gravity_y, | 297 bool has_acceleration_including_gravity_y, |
295 double acceleration_including_gravity_y, | 298 double acceleration_including_gravity_y, |
296 bool has_acceleration_including_gravity_z, | 299 bool has_acceleration_including_gravity_z, |
297 double acceleration_including_gravity_z, | 300 double acceleration_including_gravity_z, |
298 bool has_rotation_rate_alpha, | 301 bool has_rotation_rate_alpha, |
299 double rotation_rate_alpha, | 302 double rotation_rate_alpha, |
300 bool has_rotation_rate_beta, | 303 bool has_rotation_rate_beta, |
301 double rotation_rate_beta, | 304 double rotation_rate_beta, |
302 bool has_rotation_rate_gamma, | 305 bool has_rotation_rate_gamma, |
303 double rotation_rate_gamma, | 306 double rotation_rate_gamma, |
304 double interval); | 307 double interval); |
305 void SetMockDeviceOrientation(bool has_alpha, double alpha, | 308 void SetMockDeviceOrientation(bool has_alpha, |
306 bool has_beta, double beta, | 309 double alpha, |
307 bool has_gamma, double gamma, | 310 bool has_beta, |
| 311 double beta, |
| 312 bool has_gamma, |
| 313 double gamma, |
308 bool absolute); | 314 bool absolute); |
309 | 315 |
310 void SetMockScreenOrientation(const std::string& orientation); | 316 void SetMockScreenOrientation(const std::string& orientation); |
311 void DisableMockScreenOrientation(); | 317 void DisableMockScreenOrientation(); |
312 | 318 |
313 /////////////////////////////////////////////////////////////////////////// | 319 /////////////////////////////////////////////////////////////////////////// |
314 // Methods modifying WebPreferences. | 320 // Methods modifying WebPreferences. |
315 | 321 |
316 // Set the WebPreference that controls webkit's popup blocking. | 322 // Set the WebPreference that controls webkit's popup blocking. |
317 void SetPopupBlockingEnabled(bool block_popups); | 323 void SetPopupBlockingEnabled(bool block_popups); |
(...skipping 341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
659 // Forces v8 compilation cache to be disabled (used for inspector tests). | 665 // Forces v8 compilation cache to be disabled (used for inspector tests). |
660 bool disable_v8_cache_ = false; | 666 bool disable_v8_cache_ = false; |
661 | 667 |
662 base::WeakPtrFactory<TestRunner> weak_factory_; | 668 base::WeakPtrFactory<TestRunner> weak_factory_; |
663 | 669 |
664 DISALLOW_COPY_AND_ASSIGN(TestRunner); | 670 DISALLOW_COPY_AND_ASSIGN(TestRunner); |
665 }; | 671 }; |
666 | 672 |
667 } // namespace test_runner | 673 } // namespace test_runner |
668 | 674 |
669 #endif // COMPONENTS_TEST_RUNNER_TEST_RUNNER_H_ | 675 #endif // CONTENT_SHELL_TEST_RUNNER_TEST_RUNNER_H_ |
OLD | NEW |