[safe-browsing] Database full hash matches like prefix match.
[chromium-blink-merge.git] / content / shell / renderer / test_runner / WebTestInterfaces.cpp
blob38a359f8b3575419b5f9653262e893729cbeb1fb
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.
5 #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
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/test_runner.h"
14 using namespace blink;
15 using namespace content;
17 namespace WebTestRunner {
19 WebTestInterfaces::WebTestInterfaces()
20 : m_interfaces(new TestInterfaces())
24 WebTestInterfaces::~WebTestInterfaces()
28 void WebTestInterfaces::setWebView(WebView* webView, WebTestProxyBase* proxy)
30 m_interfaces->setWebView(webView, proxy);
33 void WebTestInterfaces::setDelegate(WebTestDelegate* delegate)
35 m_interfaces->setDelegate(delegate);
38 void WebTestInterfaces::bindTo(WebFrame* frame)
40 m_interfaces->bindTo(frame);
43 void WebTestInterfaces::resetAll()
45 m_interfaces->resetAll();
48 void WebTestInterfaces::setTestIsRunning(bool running)
50 m_interfaces->setTestIsRunning(running);
53 void WebTestInterfaces::configureForTestWithURL(const WebURL& testURL, bool generatePixels)
55 m_interfaces->configureForTestWithURL(testURL, generatePixels);
58 WebTestRunner* WebTestInterfaces::testRunner()
60 return m_interfaces->testRunner();
63 WebThemeEngine* WebTestInterfaces::themeEngine()
65 return m_interfaces->themeEngine();
68 TestInterfaces* WebTestInterfaces::testInterfaces()
70 return m_interfaces.get();
73 WebMediaStreamCenter* WebTestInterfaces::createMediaStreamCenter(WebMediaStreamCenterClient* client)
75 return new MockWebMediaStreamCenter(client, m_interfaces.get());
78 WebRTCPeerConnectionHandler* WebTestInterfaces::createWebRTCPeerConnectionHandler(WebRTCPeerConnectionHandlerClient* client)
80 return new MockWebRTCPeerConnectionHandler(client, m_interfaces.get());
83 WebMIDIAccessor* WebTestInterfaces::createMIDIAccessor(WebMIDIAccessorClient* client)
85 return new MockWebMIDIAccessor(client, m_interfaces.get());
88 WebAudioDevice* WebTestInterfaces::createAudioDevice(double sampleRate)
90 return new MockWebAudioDevice(sampleRate);