Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 5 #ifndef WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| 6 #define WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 6 #define WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h" | 9 #include "third_party/WebKit/Source/Platform/chromium/public/WebGamepads.h" |
| 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" | 10 #include "third_party/WebKit/Source/Platform/chromium/public/WebGraphicsContext3 D.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 const char16* characters, | 130 const char16* characters, |
| 131 size_t length, | 131 size_t length, |
| 132 size_t before_index, | 132 size_t before_index, |
| 133 const WebKit::WebString& locale); | 133 const WebKit::WebString& locale); |
| 134 | 134 |
| 135 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( | 135 virtual WebKit::WebGestureCurve* createFlingAnimationCurve( |
| 136 int device_source, | 136 int device_source, |
| 137 const WebKit::WebFloatPoint& velocity, | 137 const WebKit::WebFloatPoint& velocity, |
| 138 const WebKit::WebSize& cumulative_scroll); | 138 const WebKit::WebSize& cumulative_scroll); |
| 139 | 139 |
| 140 virtual void registerMockedURL(const WebKit::WebURL& url, | |
| 141 const WebKit::WebURLResponse& response, | |
| 142 const WebKit::WebString& filePath); | |
| 143 | |
| 144 // Registers the error to be returned when |url| is requested. | |
| 145 virtual void registerMockedErrorURL(const WebKit::WebURL& url, | |
| 146 const WebKit::WebURLResponse& response, | |
| 147 const WebKit::WebURLError& error); | |
| 148 | |
| 149 // Unregisters URLs so they are no longer mocked. | |
| 150 virtual void unregisterMockedURL(const WebKit::WebURL& url); | |
| 151 virtual void unregisterAllMockedURLs(); | |
| 152 | |
| 153 // Causes all pending asynchronous requests to be served. When this method | |
| 154 // returns all the pending requests have been processed. | |
| 155 virtual void serveAsynchronousMockedRequests(); | |
| 156 | |
| 157 // Returns the root directory of the WebKit code. | |
| 158 virtual WebKit::WebString getWebKitRootDir(); | |
|
darin (slow to review)
2013/02/10 05:07:03
nit: in the WebKit API, methods like this often la
| |
| 159 | |
| 140 private: | 160 private: |
| 141 TestShellWebMimeRegistryImpl mime_registry_; | 161 TestShellWebMimeRegistryImpl mime_registry_; |
| 142 MockWebClipboardImpl mock_clipboard_; | 162 MockWebClipboardImpl mock_clipboard_; |
| 143 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 163 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
| 144 base::ScopedTempDir appcache_dir_; | 164 base::ScopedTempDir appcache_dir_; |
| 145 SimpleAppCacheSystem appcache_system_; | 165 SimpleAppCacheSystem appcache_system_; |
| 146 SimpleDatabaseSystem database_system_; | 166 SimpleDatabaseSystem database_system_; |
| 147 SimpleDomStorageSystem dom_storage_system_; | 167 SimpleDomStorageSystem dom_storage_system_; |
| 148 SimpleWebCookieJarImpl cookie_jar_; | 168 SimpleWebCookieJarImpl cookie_jar_; |
| 149 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 169 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
| 150 SimpleFileSystem file_system_; | 170 SimpleFileSystem file_system_; |
| 151 base::ScopedTempDir file_system_root_; | 171 base::ScopedTempDir file_system_root_; |
| 152 WebURLLoaderMockFactory url_loader_factory_; | 172 WebURLLoaderMockFactory url_loader_factory_; |
| 153 bool unit_test_mode_; | 173 bool unit_test_mode_; |
| 154 WebKit::WebGamepads gamepad_data_; | 174 WebKit::WebGamepads gamepad_data_; |
| 155 WebKit::Platform* shadow_platform_delegate_; | 175 WebKit::Platform* shadow_platform_delegate_; |
| 156 HyphenDict* hyphen_dictionary_; | 176 HyphenDict* hyphen_dictionary_; |
| 157 | 177 |
| 158 #if defined(OS_WIN) || defined(OS_MACOSX) | 178 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 159 WebKit::WebThemeEngine* active_theme_engine_; | 179 WebKit::WebThemeEngine* active_theme_engine_; |
| 160 #endif | 180 #endif |
| 161 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); | 181 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); |
| 162 }; | 182 }; |
| 163 | 183 |
| 164 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 184 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| OLD | NEW |