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

Side by Side Diff: content/shell/renderer/test_runner/WebTestDelegate.h

Issue 264003003: test_runner: Move everything else into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
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_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ 5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ 6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" 10 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h"
11 #include "third_party/WebKit/public/platform/WebString.h" 11 #include "third_party/WebKit/public/platform/WebString.h"
12 #include "third_party/WebKit/public/platform/WebURL.h" 12 #include "third_party/WebKit/public/platform/WebURL.h"
13 #include "third_party/WebKit/public/platform/WebVector.h" 13 #include "third_party/WebKit/public/platform/WebVector.h"
14 14
15 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE 15 #define WEBTESTRUNNER_NEW_HISTORY_CAPTURE
16 16
17 namespace blink { 17 namespace blink {
18 class WebDeviceMotionData; 18 class WebDeviceMotionData;
19 class WebDeviceOrientationData; 19 class WebDeviceOrientationData;
20 class WebFrame; 20 class WebFrame;
21 class WebGamepad; 21 class WebGamepad;
22 class WebGamepads; 22 class WebGamepads;
23 class WebHistoryItem; 23 class WebHistoryItem;
24 struct WebRect; 24 struct WebRect;
25 struct WebSize; 25 struct WebSize;
26 struct WebURLError; 26 struct WebURLError;
27 } 27 }
28 28
29 namespace content { 29 namespace content {
30
31 class WebTask;
30 class WebTestProxyBase; 32 class WebTestProxyBase;
31 struct TestPreferences; 33 struct TestPreferences;
32 }
33
34 namespace WebTestRunner {
35
36 class WebTask;
37 34
38 class WebTestDelegate { 35 class WebTestDelegate {
39 public: 36 public:
40 // Set and clear the edit command to execute on the next call to 37 // Set and clear the edit command to execute on the next call to
41 // WebViewClient::handleCurrentKeyboardEvent(). 38 // WebViewClient::handleCurrentKeyboardEvent().
42 virtual void clearEditCommand() = 0; 39 virtual void clearEditCommand() = 0;
43 virtual void setEditCommand(const std::string& name, const std::string& valu e) = 0; 40 virtual void setEditCommand(const std::string& name, const std::string& valu e) = 0;
44 41
45 // Set the gamepads to return from Platform::sampleGamepads(). 42 // Set the gamepads to return from Platform::sampleGamepads().
46 virtual void setGamepadData(const blink::WebGamepads&) = 0; 43 virtual void setGamepadData(const blink::WebGamepads&) = 0;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 virtual blink::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) = 0; 75 virtual blink::WebString getAbsoluteWebStringFromUTF8Path(const std::string& path) = 0;
79 76
80 // Reads in the given file and returns its contents as data URL. 77 // Reads in the given file and returns its contents as data URL.
81 virtual blink::WebURL localFileToDataURL(const blink::WebURL&) = 0; 78 virtual blink::WebURL localFileToDataURL(const blink::WebURL&) = 0;
82 79
83 // Replaces file:///tmp/LayoutTests/ with the actual path to the 80 // Replaces file:///tmp/LayoutTests/ with the actual path to the
84 // LayoutTests directory. 81 // LayoutTests directory.
85 virtual blink::WebURL rewriteLayoutTestsURL(const std::string& utf8URL) = 0; 82 virtual blink::WebURL rewriteLayoutTestsURL(const std::string& utf8URL) = 0;
86 83
87 // Manages the settings to used for layout tests. 84 // Manages the settings to used for layout tests.
88 virtual content::TestPreferences* preferences() = 0; 85 virtual TestPreferences* preferences() = 0;
89 virtual void applyPreferences() = 0; 86 virtual void applyPreferences() = 0;
90 87
91 // Enables or disables synchronous resize mode. When enabled, all window-siz ing machinery is 88 // Enables or disables synchronous resize mode. When enabled, all window-siz ing machinery is
92 // short-circuited inside the renderer. This mode is necessary for some test s that were written 89 // short-circuited inside the renderer. This mode is necessary for some test s that were written
93 // before browsers had multi-process architecture and rely on window resizes to happen synchronously. 90 // before browsers had multi-process architecture and rely on window resizes to happen synchronously.
94 // The function has "unfortunate" it its name because we must strive to remo ve all tests 91 // The function has "unfortunate" it its name because we must strive to remo ve all tests
95 // that rely on this... well, unfortunate behavior. See http://crbug.com/309 760 for the plan. 92 // that rely on this... well, unfortunate behavior. See http://crbug.com/309 760 for the plan.
96 virtual void useUnfortunateSynchronousResizeMode(bool) = 0; 93 virtual void useUnfortunateSynchronousResizeMode(bool) = 0;
97 94
98 // Controls auto resize mode. 95 // Controls auto resize mode.
(...skipping 12 matching lines...) Expand all
111 virtual void evaluateInWebInspector(long callID, const std::string& script) = 0; 108 virtual void evaluateInWebInspector(long callID, const std::string& script) = 0;
112 109
113 // Controls WebSQL databases. 110 // Controls WebSQL databases.
114 virtual void clearAllDatabases() = 0; 111 virtual void clearAllDatabases() = 0;
115 virtual void setDatabaseQuota(int) = 0; 112 virtual void setDatabaseQuota(int) = 0;
116 113
117 // Controls the device scale factor of the main WebView for hidpi tests. 114 // Controls the device scale factor of the main WebView for hidpi tests.
118 virtual void setDeviceScaleFactor(float) = 0; 115 virtual void setDeviceScaleFactor(float) = 0;
119 116
120 // Controls which WebView should be focused. 117 // Controls which WebView should be focused.
121 virtual void setFocus(content::WebTestProxyBase*, bool) = 0; 118 virtual void setFocus(WebTestProxyBase*, bool) = 0;
122 119
123 // Controls whether all cookies should be accepted or writing cookies in a 120 // Controls whether all cookies should be accepted or writing cookies in a
124 // third-party context is blocked. 121 // third-party context is blocked.
125 virtual void setAcceptAllCookies(bool) = 0; 122 virtual void setAcceptAllCookies(bool) = 0;
126 123
127 // The same as rewriteLayoutTestsURL unless the resource is a path starting 124 // The same as rewriteLayoutTestsURL unless the resource is a path starting
128 // with /tmp/, then return a file URL to a temporary file. 125 // with /tmp/, then return a file URL to a temporary file.
129 virtual std::string pathToLocalResource(const std::string& resource) = 0; 126 virtual std::string pathToLocalResource(const std::string& resource) = 0;
130 127
131 // Sets the POSIX locale of the current process. 128 // Sets the POSIX locale of the current process.
(...skipping 13 matching lines...) Expand all
145 // The following trigger navigations on the main WebViwe. 142 // The following trigger navigations on the main WebViwe.
146 virtual void goToOffset(int offset) = 0; 143 virtual void goToOffset(int offset) = 0;
147 virtual void reload() = 0; 144 virtual void reload() = 0;
148 virtual void loadURLForFrame(const blink::WebURL&, const std::string& frameN ame) = 0; 145 virtual void loadURLForFrame(const blink::WebURL&, const std::string& frameN ame) = 0;
149 146
150 // Returns true if resource requests to external URLs should be permitted. 147 // Returns true if resource requests to external URLs should be permitted.
151 virtual bool allowExternalPages() = 0; 148 virtual bool allowExternalPages() = 0;
152 149
153 // Returns a text dump the back/forward history for the WebView associated 150 // Returns a text dump the back/forward history for the WebView associated
154 // with the given WebTestProxyBase. 151 // with the given WebTestProxyBase.
155 virtual std::string dumpHistoryForWindow(content::WebTestProxyBase*) = 0; 152 virtual std::string dumpHistoryForWindow(WebTestProxyBase*) = 0;
156 }; 153 };
157 154
158 } 155 } // namespace content
159 156
160 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_ 157 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBTESTDELEGATE_H_
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/WebTask.cpp ('k') | content/shell/renderer/test_runner/WebTestInterfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698