| 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" |
| 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebUnitTestSupport.
h" | 11 #include "third_party/WebKit/Source/Platform/chromium/public/WebUnitTestSupport.
h" |
| 12 #include "webkit/glue/webfileutilities_impl.h" | 12 #include "webkit/glue/webfileutilities_impl.h" |
| 13 #include "webkit/glue/webkitplatformsupport_impl.h" | 13 #include "webkit/glue/webkitplatformsupport_impl.h" |
| 14 #include "webkit/mocks/mock_webhyphenator.h" |
| 14 #include "webkit/support/simple_database_system.h" | 15 #include "webkit/support/simple_database_system.h" |
| 15 #include "webkit/support/weburl_loader_mock_factory.h" | 16 #include "webkit/support/weburl_loader_mock_factory.h" |
| 16 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" | 17 #include "webkit/tools/test_shell/mock_webclipboard_impl.h" |
| 17 #include "webkit/tools/test_shell/simple_appcache_system.h" | 18 #include "webkit/tools/test_shell/simple_appcache_system.h" |
| 18 #include "webkit/tools/test_shell/simple_dom_storage_system.h" | 19 #include "webkit/tools/test_shell/simple_dom_storage_system.h" |
| 19 #include "webkit/tools/test_shell/simple_file_system.h" | 20 #include "webkit/tools/test_shell/simple_file_system.h" |
| 20 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" | 21 #include "webkit/tools/test_shell/simple_webcookiejar_impl.h" |
| 21 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h" | 22 #include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h" |
| 22 | 23 |
| 23 class TestShellWebBlobRegistryImpl; | 24 class TestShellWebBlobRegistryImpl; |
| 24 | 25 |
| 25 namespace WebKit { | 26 namespace WebKit { |
| 26 class WebAudioDevice; | 27 class WebAudioDevice; |
| 27 class WebLayerTreeView; | 28 class WebLayerTreeView; |
| 28 } | 29 } |
| 29 | 30 |
| 30 typedef struct _HyphenDict HyphenDict; | |
| 31 | |
| 32 // An implementation of WebKitPlatformSupport for tests. | 31 // An implementation of WebKitPlatformSupport for tests. |
| 33 class TestWebKitPlatformSupport : | 32 class TestWebKitPlatformSupport : |
| 34 public WebKit::WebUnitTestSupport, | 33 public WebKit::WebUnitTestSupport, |
| 35 public webkit_glue::WebKitPlatformSupportImpl { | 34 public webkit_glue::WebKitPlatformSupportImpl { |
| 36 public: | 35 public: |
| 37 TestWebKitPlatformSupport(bool unit_test_mode, | 36 TestWebKitPlatformSupport(bool unit_test_mode, |
| 38 WebKit::Platform* shadow_platform_delegate); | 37 WebKit::Platform* shadow_platform_delegate); |
| 39 virtual ~TestWebKitPlatformSupport(); | 38 virtual ~TestWebKitPlatformSupport(); |
| 40 | 39 |
| 41 virtual WebKit::WebMimeRegistry* mimeRegistry(); | 40 virtual WebKit::WebMimeRegistry* mimeRegistry(); |
| 42 virtual WebKit::WebClipboard* clipboard(); | 41 virtual WebKit::WebClipboard* clipboard(); |
| 43 virtual WebKit::WebFileUtilities* fileUtilities(); | 42 virtual WebKit::WebFileUtilities* fileUtilities(); |
| 44 virtual WebKit::WebSandboxSupport* sandboxSupport(); | 43 virtual WebKit::WebSandboxSupport* sandboxSupport(); |
| 45 virtual WebKit::WebCookieJar* cookieJar(); | 44 virtual WebKit::WebCookieJar* cookieJar(); |
| 46 virtual WebKit::WebBlobRegistry* blobRegistry(); | 45 virtual WebKit::WebBlobRegistry* blobRegistry(); |
| 47 virtual WebKit::WebFileSystem* fileSystem(); | 46 virtual WebKit::WebFileSystem* fileSystem(); |
| 47 virtual WebKit::WebHyphenator* hyphenator(); |
| 48 | 48 |
| 49 virtual bool sandboxEnabled(); | 49 virtual bool sandboxEnabled(); |
| 50 virtual WebKit::Platform::FileHandle databaseOpenFile( | 50 virtual WebKit::Platform::FileHandle databaseOpenFile( |
| 51 const WebKit::WebString& vfs_file_name, int desired_flags); | 51 const WebKit::WebString& vfs_file_name, int desired_flags); |
| 52 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, | 52 virtual int databaseDeleteFile(const WebKit::WebString& vfs_file_name, |
| 53 bool sync_dir); | 53 bool sync_dir); |
| 54 virtual long databaseGetFileAttributes( | 54 virtual long databaseGetFileAttributes( |
| 55 const WebKit::WebString& vfs_file_name); | 55 const WebKit::WebString& vfs_file_name); |
| 56 virtual long long databaseGetFileSize( | 56 virtual long long databaseGetFileSize( |
| 57 const WebKit::WebString& vfs_file_name); | 57 const WebKit::WebString& vfs_file_name); |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 MockWebClipboardImpl mock_clipboard_; | 163 MockWebClipboardImpl mock_clipboard_; |
| 164 webkit_glue::WebFileUtilitiesImpl file_utilities_; | 164 webkit_glue::WebFileUtilitiesImpl file_utilities_; |
| 165 base::ScopedTempDir appcache_dir_; | 165 base::ScopedTempDir appcache_dir_; |
| 166 SimpleAppCacheSystem appcache_system_; | 166 SimpleAppCacheSystem appcache_system_; |
| 167 SimpleDatabaseSystem database_system_; | 167 SimpleDatabaseSystem database_system_; |
| 168 SimpleDomStorageSystem dom_storage_system_; | 168 SimpleDomStorageSystem dom_storage_system_; |
| 169 SimpleWebCookieJarImpl cookie_jar_; | 169 SimpleWebCookieJarImpl cookie_jar_; |
| 170 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; | 170 scoped_refptr<TestShellWebBlobRegistryImpl> blob_registry_; |
| 171 SimpleFileSystem file_system_; | 171 SimpleFileSystem file_system_; |
| 172 base::ScopedTempDir file_system_root_; | 172 base::ScopedTempDir file_system_root_; |
| 173 webkit_glue::MockWebHyphenator hyphenator_; |
| 173 WebURLLoaderMockFactory url_loader_factory_; | 174 WebURLLoaderMockFactory url_loader_factory_; |
| 174 bool unit_test_mode_; | 175 bool unit_test_mode_; |
| 175 WebKit::WebGamepads gamepad_data_; | 176 WebKit::WebGamepads gamepad_data_; |
| 176 WebKit::Platform* shadow_platform_delegate_; | 177 WebKit::Platform* shadow_platform_delegate_; |
| 177 HyphenDict* hyphen_dictionary_; | |
| 178 | 178 |
| 179 #if defined(OS_WIN) || defined(OS_MACOSX) | 179 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 180 WebKit::WebThemeEngine* active_theme_engine_; | 180 WebKit::WebThemeEngine* active_theme_engine_; |
| 181 #endif | 181 #endif |
| 182 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); | 182 DISALLOW_COPY_AND_ASSIGN(TestWebKitPlatformSupport); |
| 183 }; | 183 }; |
| 184 | 184 |
| 185 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ | 185 #endif // WEBKIT_SUPPORT_TEST_WEBKIT_PLATFORM_SUPPORT_H_ |
| OLD | NEW |