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

Unified Diff: webkit/support/test_webkit_platform_support.cc

Issue 12220091: Add implementations of WebKit::Platform testing APIs to TestWebKitPlatformSupport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with compile guard for WebUnitTestSupport.h Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/test_webkit_platform_support.cc
diff --git a/webkit/support/test_webkit_platform_support.cc b/webkit/support/test_webkit_platform_support.cc
index d08108b5b04ebf149a6cdde0f73e7614478a2032..37afb4cb4e38fc2e752385b5779447156d40093c 100644
--- a/webkit/support/test_webkit_platform_support.cc
+++ b/webkit/support/test_webkit_platform_support.cc
@@ -544,3 +544,40 @@ WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve(
// Caller will retain and release.
return new WebGestureCurveMock(velocity, cumulative_scroll);
}
+
+#if HAVE_WEBUNITTESTSUPPORT
+WebKit::WebUnitTestSupport* TestWebKitPlatformSupport::unitTestSupport() {
+ return this;
+}
+#endif
+
+void TestWebKitPlatformSupport::registerMockedURL(
+ const WebKit::WebURL& url,
+ const WebKit::WebURLResponse& response,
+ const WebKit::WebString& file_path) {
+ url_loader_factory_.RegisterURL(url, response, file_path);
+}
+
+void TestWebKitPlatformSupport::registerMockedErrorURL(
+ const WebKit::WebURL& url,
+ const WebKit::WebURLResponse& response,
+ const WebKit::WebURLError& error) {
+ url_loader_factory_.RegisterErrorURL(url, response, error);
+}
+
+void TestWebKitPlatformSupport::unregisterMockedURL(const WebKit::WebURL& url) {
+ url_loader_factory_.UnregisterURL(url);
+}
+
+void TestWebKitPlatformSupport::unregisterAllMockedURLs() {
+ url_loader_factory_.UnregisterAllURLs();
+}
+
+void TestWebKitPlatformSupport::serveAsynchronousMockedRequests() {
+ url_loader_factory_.ServeAsynchronousRequests();
+}
+
+WebKit::WebString TestWebKitPlatformSupport::webKitRootDir() {
+ return webkit_support::GetWebKitRootDir();
+}
+
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698