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 #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 Loading... |
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 |
OLD | NEW |