Commit 5d6534dc authored by tfarina@chromium.org's avatar tfarina@chromium.org

test_runner: Migrate MockWebAudioDevice to our Chromium C++ style.

Changes:
1) Run clang-format through source and header files.
2) Fix data member variables to use unix_hacker_ style.
3) Rename file name to mock_web_audio_device.

BUG=331299
TEST=content_unittests, content_shell. No functional changes
TBR=dpranke@chromium.org

Review URL: https://codereview.chromium.org/317253004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@275421 0039d316-1c4b-4281-b951-d872f2087c98
parent 751e9724
...@@ -177,8 +177,6 @@ ...@@ -177,8 +177,6 @@
'shell/renderer/test_runner/MockColorChooser.h', 'shell/renderer/test_runner/MockColorChooser.h',
'shell/renderer/test_runner/MockSpellCheck.cpp', 'shell/renderer/test_runner/MockSpellCheck.cpp',
'shell/renderer/test_runner/MockSpellCheck.h', 'shell/renderer/test_runner/MockSpellCheck.h',
'shell/renderer/test_runner/MockWebAudioDevice.cpp',
'shell/renderer/test_runner/MockWebAudioDevice.h',
'shell/renderer/test_runner/MockWebMIDIAccessor.cpp', 'shell/renderer/test_runner/MockWebMIDIAccessor.cpp',
'shell/renderer/test_runner/MockWebMIDIAccessor.h', 'shell/renderer/test_runner/MockWebMIDIAccessor.h',
'shell/renderer/test_runner/MockWebMediaStreamCenter.cpp', 'shell/renderer/test_runner/MockWebMediaStreamCenter.cpp',
...@@ -214,6 +212,8 @@ ...@@ -214,6 +212,8 @@
'shell/renderer/test_runner/mock_constraints.h', 'shell/renderer/test_runner/mock_constraints.h',
'shell/renderer/test_runner/mock_grammar_check.cc', 'shell/renderer/test_runner/mock_grammar_check.cc',
'shell/renderer/test_runner/mock_grammar_check.h', 'shell/renderer/test_runner/mock_grammar_check.h',
'shell/renderer/test_runner/mock_web_audio_device.cc',
'shell/renderer/test_runner/mock_web_audio_device.h',
'shell/renderer/test_runner/mock_web_user_media_client.cc', 'shell/renderer/test_runner/mock_web_user_media_client.cc',
'shell/renderer/test_runner/mock_web_user_media_client.h', 'shell/renderer/test_runner/mock_web_user_media_client.h',
'shell/renderer/test_runner/mock_webrtc_data_channel_handler.cc', 'shell/renderer/test_runner/mock_webrtc_data_channel_handler.cc',
......
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/shell/renderer/test_runner/MockWebAudioDevice.h"
namespace content {
MockWebAudioDevice::MockWebAudioDevice(double sampleRate)
: m_sampleRate(sampleRate)
{
}
MockWebAudioDevice::~MockWebAudioDevice()
{
}
void MockWebAudioDevice::start()
{
}
void MockWebAudioDevice::stop()
{
}
double MockWebAudioDevice::sampleRate()
{
return m_sampleRate;
}
} // namespace content
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBAUDIODEVICE_H_
#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBAUDIODEVICE_H_
#include "base/basictypes.h"
#include "content/shell/renderer/test_runner/TestCommon.h"
#include "third_party/WebKit/public/platform/WebAudioDevice.h"
namespace content {
class MockWebAudioDevice : public blink::WebAudioDevice {
public:
explicit MockWebAudioDevice(double sampleRate);
virtual ~MockWebAudioDevice();
virtual void start();
virtual void stop();
virtual double sampleRate();
private:
double m_sampleRate;
DISALLOW_COPY_AND_ASSIGN(MockWebAudioDevice);
};
} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCKWEBAUDIODEVICE_H_
...@@ -4,10 +4,10 @@ ...@@ -4,10 +4,10 @@
#include "content/shell/renderer/test_runner/WebTestInterfaces.h" #include "content/shell/renderer/test_runner/WebTestInterfaces.h"
#include "content/shell/renderer/test_runner/MockWebAudioDevice.h"
#include "content/shell/renderer/test_runner/MockWebMIDIAccessor.h" #include "content/shell/renderer/test_runner/MockWebMIDIAccessor.h"
#include "content/shell/renderer/test_runner/MockWebMediaStreamCenter.h" #include "content/shell/renderer/test_runner/MockWebMediaStreamCenter.h"
#include "content/shell/renderer/test_runner/TestInterfaces.h" #include "content/shell/renderer/test_runner/TestInterfaces.h"
#include "content/shell/renderer/test_runner/mock_web_audio_device.h"
#include "content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h" #include "content/shell/renderer/test_runner/mock_webrtc_peer_connection_handler.h"
#include "content/shell/renderer/test_runner/test_runner.h" #include "content/shell/renderer/test_runner/test_runner.h"
......
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/shell/renderer/test_runner/mock_web_audio_device.h"
namespace content {
MockWebAudioDevice::MockWebAudioDevice(double sample_rate)
: sample_rate_(sample_rate) {}
MockWebAudioDevice::~MockWebAudioDevice() {}
void MockWebAudioDevice::start() {}
void MockWebAudioDevice::stop() {}
double MockWebAudioDevice::sampleRate() {
return sample_rate_;
}
} // namespace content
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_AUDIO_DEVICE_H_
#define CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_AUDIO_DEVICE_H_
#include "base/macros.h"
#include "third_party/WebKit/public/platform/WebAudioDevice.h"
namespace content {
class MockWebAudioDevice : public blink::WebAudioDevice {
public:
explicit MockWebAudioDevice(double sample_rate);
virtual ~MockWebAudioDevice();
// blink::WebAudioDevice:
virtual void start();
virtual void stop();
virtual double sampleRate();
private:
double sample_rate_;
DISALLOW_COPY_AND_ASSIGN(MockWebAudioDevice);
};
} // namespace content
#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_MOCK_WEB_AUDIO_DEVICE_H_
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment