| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 5 #ifndef CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 6 #define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/callback_forward.h" | 12 #include "base/callback_forward.h" |
| 13 #include "base/memory/ref_counted.h" | 13 #include "base/memory/ref_counted.h" |
| 14 #include "third_party/WebKit/public/platform/WebString.h" | 14 #include "third_party/WebKit/public/platform/WebString.h" |
| 15 #include "third_party/WebKit/public/platform/WebURL.h" | 15 #include "third_party/WebKit/public/platform/WebURL.h" |
| 16 #include "third_party/WebKit/public/platform/WebVector.h" | 16 #include "third_party/WebKit/public/platform/WebVector.h" |
| 17 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" | 17 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationType.h" |
| 18 | 18 |
| 19 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE | 19 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE |
| 20 | 20 |
| 21 namespace base { | 21 namespace base { |
| 22 class DictionaryValue; | 22 class DictionaryValue; |
| 23 } | 23 } |
| 24 | 24 |
| 25 namespace blink { | 25 namespace blink { |
| 26 class WebDeviceMotionData; | |
| 27 class WebDeviceOrientationData; | |
| 28 class WebFrame; | 26 class WebFrame; |
| 29 class WebInputEvent; | 27 class WebInputEvent; |
| 30 class WebLocalFrame; | 28 class WebLocalFrame; |
| 31 class WebMediaStream; | 29 class WebMediaStream; |
| 32 class WebPlugin; | 30 class WebPlugin; |
| 33 struct WebPluginParams; | 31 struct WebPluginParams; |
| 34 struct WebSize; | 32 struct WebSize; |
| 35 class WebURLRequest; | 33 class WebURLRequest; |
| 36 class WebURLResponse; | 34 class WebURLResponse; |
| 37 class WebView; | 35 class WebView; |
| 38 } | 36 } |
| 39 | 37 |
| 40 namespace cc { | 38 namespace cc { |
| 41 class SharedBitmapManager; | 39 class SharedBitmapManager; |
| 42 } | 40 } |
| 43 | 41 |
| 42 namespace device { |
| 43 class MotionData; |
| 44 class OrientationData; |
| 45 } |
| 46 |
| 44 namespace test_runner { | 47 namespace test_runner { |
| 45 | 48 |
| 46 class GamepadController; | 49 class GamepadController; |
| 47 class WebTask; | 50 class WebTask; |
| 48 class WebWidgetTestProxyBase; | 51 class WebWidgetTestProxyBase; |
| 49 struct TestPreferences; | 52 struct TestPreferences; |
| 50 | 53 |
| 51 class WebTestDelegate { | 54 class WebTestDelegate { |
| 52 public: | 55 public: |
| 53 // Set and clear the edit command to execute on the next call to | 56 // Set and clear the edit command to execute on the next call to |
| 54 // WebViewClient::handleCurrentKeyboardEvent(). | 57 // WebViewClient::handleCurrentKeyboardEvent(). |
| 55 virtual void ClearEditCommand() = 0; | 58 virtual void ClearEditCommand() = 0; |
| 56 virtual void SetEditCommand(const std::string& name, | 59 virtual void SetEditCommand(const std::string& name, |
| 57 const std::string& value) = 0; | 60 const std::string& value) = 0; |
| 58 | 61 |
| 59 // Sets gamepad provider to be used for tests. | 62 // Sets gamepad provider to be used for tests. |
| 60 virtual void SetGamepadProvider(GamepadController* controller) = 0; | 63 virtual void SetGamepadProvider(GamepadController* controller) = 0; |
| 61 | 64 |
| 62 // Set data to return when registering via | 65 // Set data to return when registering via |
| 63 // Platform::setDeviceLightListener(). | 66 // Platform::setDeviceLightListener(). |
| 64 virtual void SetDeviceLightData(const double data) = 0; | 67 virtual void SetDeviceLightData(const double data) = 0; |
| 65 // Set data to return when registering via | 68 // Set data to return when registering via |
| 66 // Platform::setDeviceMotionListener(). | 69 // Platform::setDeviceMotionListener(). |
| 67 virtual void SetDeviceMotionData(const blink::WebDeviceMotionData& data) = 0; | 70 virtual void SetDeviceMotionData(const device::MotionData& data) = 0; |
| 68 // Set data to return when registering via | 71 // Set data to return when registering via |
| 69 // Platform::setDeviceOrientationListener(). | 72 // Platform::setDeviceOrientationListener(). |
| 70 virtual void SetDeviceOrientationData( | 73 virtual void SetDeviceOrientationData( |
| 71 const blink::WebDeviceOrientationData& data) = 0; | 74 const device::OrientationData& data) = 0; |
| 72 | 75 |
| 73 // Add a message to stderr (not saved to expected output files, for debugging | 76 // Add a message to stderr (not saved to expected output files, for debugging |
| 74 // only). | 77 // only). |
| 75 virtual void PrintMessageToStderr(const std::string& message) = 0; | 78 virtual void PrintMessageToStderr(const std::string& message) = 0; |
| 76 | 79 |
| 77 // Add a message to the text dump for the layout test. | 80 // Add a message to the text dump for the layout test. |
| 78 virtual void PrintMessage(const std::string& message) = 0; | 81 virtual void PrintMessage(const std::string& message) = 0; |
| 79 | 82 |
| 80 // The delegate takes ownership of the WebTask objects and is responsible | 83 // The delegate takes ownership of the WebTask objects and is responsible |
| 81 // for deleting them. | 84 // for deleting them. |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 | 302 |
| 300 // PlzNavigate | 303 // PlzNavigate |
| 301 // Indicates if the navigation was initiated by the browser or renderer. | 304 // Indicates if the navigation was initiated by the browser or renderer. |
| 302 virtual bool IsNavigationInitiatedByRenderer( | 305 virtual bool IsNavigationInitiatedByRenderer( |
| 303 const blink::WebURLRequest& request) = 0; | 306 const blink::WebURLRequest& request) = 0; |
| 304 }; | 307 }; |
| 305 | 308 |
| 306 } // namespace test_runner | 309 } // namespace test_runner |
| 307 | 310 |
| 308 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ | 311 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ |
| OLD | NEW |