summaryrefslogtreecommitdiffstats
path: root/webkit/support/test_webkit_platform_support.h
diff options
context:
space:
mode:
Diffstat (limited to 'webkit/support/test_webkit_platform_support.h')
-rw-r--r--webkit/support/test_webkit_platform_support.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/webkit/support/test_webkit_platform_support.h b/webkit/support/test_webkit_platform_support.h
index bb92e61..d55a070 100644
--- a/webkit/support/test_webkit_platform_support.h
+++ b/webkit/support/test_webkit_platform_support.h
@@ -19,6 +19,10 @@
#include "webkit/tools/test_shell/simple_webcookiejar_impl.h"
#include "webkit/tools/test_shell/test_shell_webmimeregistry_impl.h"
+#if HAVE_WEBUNITTESTSUPPORT
+#include "third_party/WebKit/Source/Platform/chromium/public/WebUnitTestSupport.h"
+#endif
+
class TestShellWebBlobRegistryImpl;
namespace WebKit {
@@ -29,6 +33,9 @@ typedef struct _HyphenDict HyphenDict;
// An implementation of WebKitPlatformSupport for tests.
class TestWebKitPlatformSupport :
+#if HAVE_WEBUNITTESTSUPPORT
+ public NON_EXPORTED_BASE(WebKit::WebUnitTestSupport),
+#endif
public webkit_glue::WebKitPlatformSupportImpl {
public:
TestWebKitPlatformSupport(bool unit_test_mode,
@@ -134,6 +141,22 @@ class TestWebKitPlatformSupport :
const WebKit::WebFloatPoint& velocity,
const WebKit::WebSize& cumulative_scroll);
+#if HAVE_WEBUNITTESTSUPPORT
+ virtual WebKit::WebUnitTestSupport* unitTestSupport();
+#endif
+
+ // WebUnitTestSupport implementation
+ virtual void registerMockedURL(const WebKit::WebURL& url,
+ const WebKit::WebURLResponse& response,
+ const WebKit::WebString& filePath);
+ virtual void registerMockedErrorURL(const WebKit::WebURL& url,
+ const WebKit::WebURLResponse& response,
+ const WebKit::WebURLError& error);
+ virtual void unregisterMockedURL(const WebKit::WebURL& url);
+ virtual void unregisterAllMockedURLs();
+ virtual void serveAsynchronousMockedRequests();
+ virtual WebKit::WebString webKitRootDir();
+
private:
TestShellWebMimeRegistryImpl mime_registry_;
MockWebClipboardImpl mock_clipboard_;