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

Side by Side Diff: content/shell/test_runner/web_test_delegate.h

Issue 2896583005: Reland: Refactor DeviceMotionEventPump to use //device/generic_sensor instead of //device/sensors (Closed)
Patch Set: updated test code Created 3 years, 7 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 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;
26 class WebFrame; 27 class WebFrame;
27 class WebInputEvent; 28 class WebInputEvent;
28 class WebLocalFrame; 29 class WebLocalFrame;
29 class WebMediaStream; 30 class WebMediaStream;
30 class WebPlugin; 31 class WebPlugin;
31 struct WebPluginParams; 32 struct WebPluginParams;
32 struct WebSize; 33 struct WebSize;
33 class WebURLRequest; 34 class WebURLRequest;
34 class WebURLResponse; 35 class WebURLResponse;
35 class WebView; 36 class WebView;
36 } 37 }
37 38
38 namespace cc { 39 namespace cc {
39 class SharedBitmapManager; 40 class SharedBitmapManager;
40 } 41 }
41 42
42 namespace device { 43 namespace device {
43 class MotionData;
44 class OrientationData; 44 class OrientationData;
45 } 45 }
46 46
47 namespace test_runner { 47 namespace test_runner {
48 48
49 class GamepadController; 49 class GamepadController;
50 class WebTask; 50 class WebTask;
51 class WebWidgetTestProxyBase; 51 class WebWidgetTestProxyBase;
52 struct TestPreferences; 52 struct TestPreferences;
53 53
54 class WebTestDelegate { 54 class WebTestDelegate {
55 public: 55 public:
56 // 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
57 // WebViewClient::handleCurrentKeyboardEvent(). 57 // WebViewClient::handleCurrentKeyboardEvent().
58 virtual void ClearEditCommand() = 0; 58 virtual void ClearEditCommand() = 0;
59 virtual void SetEditCommand(const std::string& name, 59 virtual void SetEditCommand(const std::string& name,
60 const std::string& value) = 0; 60 const std::string& value) = 0;
61 61
62 // Sets gamepad provider to be used for tests. 62 // Sets gamepad provider to be used for tests.
63 virtual void SetGamepadProvider(GamepadController* controller) = 0; 63 virtual void SetGamepadProvider(GamepadController* controller) = 0;
64 64
65 // Set data to return when registering via 65 // Set data to return when registering via
66 // Platform::setDeviceMotionListener(). 66 // Platform::setDeviceMotionListener().
67 virtual void SetDeviceMotionData(const device::MotionData& data) = 0; 67 virtual void SetDeviceMotionData(const blink::WebDeviceMotionData& data) = 0;
68 // Set data to return when registering via 68 // Set data to return when registering via
69 // Platform::setDeviceOrientationListener(). 69 // Platform::setDeviceOrientationListener().
70 virtual void SetDeviceOrientationData( 70 virtual void SetDeviceOrientationData(
71 const device::OrientationData& data) = 0; 71 const device::OrientationData& data) = 0;
72 72
73 // Add a message to stderr (not saved to expected output files, for debugging 73 // Add a message to stderr (not saved to expected output files, for debugging
74 // only). 74 // only).
75 virtual void PrintMessageToStderr(const std::string& message) = 0; 75 virtual void PrintMessageToStderr(const std::string& message) = 0;
76 76
77 // Add a message to the text dump for the layout test. 77 // Add a message to the text dump for the layout test.
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 virtual bool IsNavigationInitiatedByRenderer( 301 virtual bool IsNavigationInitiatedByRenderer(
302 const blink::WebURLRequest& request) = 0; 302 const blink::WebURLRequest& request) = 0;
303 303
304 protected: 304 protected:
305 virtual ~WebTestDelegate() {} 305 virtual ~WebTestDelegate() {}
306 }; 306 };
307 307
308 } // namespace test_runner 308 } // namespace test_runner
309 309
310 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_ 310 #endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698