OLD | NEW |
(Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/shell/renderer/test_runner/WebTestInterfaces.h" |
| 6 |
| 7 #include "content/shell/renderer/test_runner/MockWebAudioDevice.h" |
| 8 #include "content/shell/renderer/test_runner/MockWebMIDIAccessor.h" |
| 9 #include "content/shell/renderer/test_runner/MockWebMediaStreamCenter.h" |
| 10 #include "content/shell/renderer/test_runner/MockWebRTCPeerConnectionHandler.h" |
| 11 #include "content/shell/renderer/test_runner/TestInterfaces.h" |
| 12 #include "content/shell/renderer/test_runner/TestRunner.h" |
| 13 |
| 14 using namespace blink; |
| 15 |
| 16 namespace WebTestRunner { |
| 17 |
| 18 WebTestInterfaces::WebTestInterfaces() |
| 19 : m_interfaces(new TestInterfaces()) |
| 20 { |
| 21 } |
| 22 |
| 23 WebTestInterfaces::~WebTestInterfaces() |
| 24 { |
| 25 } |
| 26 |
| 27 void WebTestInterfaces::setWebView(WebView* webView, WebTestProxyBase* proxy) |
| 28 { |
| 29 m_interfaces->setWebView(webView, proxy); |
| 30 } |
| 31 |
| 32 void WebTestInterfaces::setDelegate(WebTestDelegate* delegate) |
| 33 { |
| 34 m_interfaces->setDelegate(delegate); |
| 35 } |
| 36 |
| 37 void WebTestInterfaces::bindTo(WebFrame* frame) |
| 38 { |
| 39 m_interfaces->bindTo(frame); |
| 40 } |
| 41 |
| 42 void WebTestInterfaces::resetAll() |
| 43 { |
| 44 m_interfaces->resetAll(); |
| 45 } |
| 46 |
| 47 void WebTestInterfaces::setTestIsRunning(bool running) |
| 48 { |
| 49 m_interfaces->setTestIsRunning(running); |
| 50 } |
| 51 |
| 52 void WebTestInterfaces::configureForTestWithURL(const WebURL& testURL, bool gene
ratePixels) |
| 53 { |
| 54 m_interfaces->configureForTestWithURL(testURL, generatePixels); |
| 55 } |
| 56 |
| 57 WebTestRunner* WebTestInterfaces::testRunner() |
| 58 { |
| 59 return m_interfaces->testRunner(); |
| 60 } |
| 61 |
| 62 WebThemeEngine* WebTestInterfaces::themeEngine() |
| 63 { |
| 64 return m_interfaces->themeEngine(); |
| 65 } |
| 66 |
| 67 TestInterfaces* WebTestInterfaces::testInterfaces() |
| 68 { |
| 69 return m_interfaces.get(); |
| 70 } |
| 71 |
| 72 WebMediaStreamCenter* WebTestInterfaces::createMediaStreamCenter(WebMediaStreamC
enterClient* client) |
| 73 { |
| 74 return new MockWebMediaStreamCenter(client); |
| 75 } |
| 76 |
| 77 WebRTCPeerConnectionHandler* WebTestInterfaces::createWebRTCPeerConnectionHandle
r(WebRTCPeerConnectionHandlerClient* client) |
| 78 { |
| 79 return new MockWebRTCPeerConnectionHandler(client, m_interfaces.get()); |
| 80 } |
| 81 |
| 82 WebMIDIAccessor* WebTestInterfaces::createMIDIAccessor(WebMIDIAccessorClient* cl
ient) |
| 83 { |
| 84 return new MockWebMIDIAccessor(client, m_interfaces.get()); |
| 85 } |
| 86 |
| 87 WebAudioDevice* WebTestInterfaces::createAudioDevice(double sampleRate) |
| 88 { |
| 89 return new MockWebAudioDevice(sampleRate); |
| 90 } |
| 91 |
| 92 } |
OLD | NEW |