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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « webkit/support/test_webkit_platform_support.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "webkit/support/test_webkit_platform_support.h" 5 #include "webkit/support/test_webkit_platform_support.h"
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/metrics/stats_counters.h" 9 #include "base/metrics/stats_counters.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after
537 return 0; 537 return 0;
538 } 538 }
539 539
540 WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve( 540 WebKit::WebGestureCurve* TestWebKitPlatformSupport::createFlingAnimationCurve(
541 int device_source, 541 int device_source,
542 const WebKit::WebFloatPoint& velocity, 542 const WebKit::WebFloatPoint& velocity,
543 const WebKit::WebSize& cumulative_scroll) { 543 const WebKit::WebSize& cumulative_scroll) {
544 // Caller will retain and release. 544 // Caller will retain and release.
545 return new WebGestureCurveMock(velocity, cumulative_scroll); 545 return new WebGestureCurveMock(velocity, cumulative_scroll);
546 } 546 }
547
548 #if HAVE_WEBUNITTESTSUPPORT
549 WebKit::WebUnitTestSupport* TestWebKitPlatformSupport::unitTestSupport() {
550 return this;
551 }
552 #endif
553
554 void TestWebKitPlatformSupport::registerMockedURL(
555 const WebKit::WebURL& url,
556 const WebKit::WebURLResponse& response,
557 const WebKit::WebString& file_path) {
558 url_loader_factory_.RegisterURL(url, response, file_path);
559 }
560
561 void TestWebKitPlatformSupport::registerMockedErrorURL(
562 const WebKit::WebURL& url,
563 const WebKit::WebURLResponse& response,
564 const WebKit::WebURLError& error) {
565 url_loader_factory_.RegisterErrorURL(url, response, error);
566 }
567
568 void TestWebKitPlatformSupport::unregisterMockedURL(const WebKit::WebURL& url) {
569 url_loader_factory_.UnregisterURL(url);
570 }
571
572 void TestWebKitPlatformSupport::unregisterAllMockedURLs() {
573 url_loader_factory_.UnregisterAllURLs();
574 }
575
576 void TestWebKitPlatformSupport::serveAsynchronousMockedRequests() {
577 url_loader_factory_.ServeAsynchronousRequests();
578 }
579
580 WebKit::WebString TestWebKitPlatformSupport::webKitRootDir() {
581 return webkit_support::GetWebKitRootDir();
582 }
583
OLDNEW
« 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