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

Unified Diff: components/copresence/mediums/audio/audio_manager_unittest.cc

Issue 901753002: Cleaning up some tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Using rand() instead of rand_r() on Windows Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/copresence/test/audio_test_support.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/copresence/mediums/audio/audio_manager_unittest.cc
diff --git a/components/copresence/mediums/audio/audio_manager_unittest.cc b/components/copresence/mediums/audio/audio_manager_unittest.cc
index b30a1f5b71fbc1e5f79626cebdc3d5233c46182c..1e541be0b243b37d1b2e7a32e05191b7944ee7b2 100644
--- a/components/copresence/mediums/audio/audio_manager_unittest.cc
+++ b/components/copresence/mediums/audio/audio_manager_unittest.cc
@@ -4,11 +4,14 @@
#include "components/copresence/mediums/audio/audio_manager.h"
+#include <vector>
+
#include "base/bind.h"
#include "base/message_loop/message_loop.h"
#include "components/copresence/mediums/audio/audio_manager_impl.h"
#include "components/copresence/mediums/audio/audio_player.h"
#include "components/copresence/mediums/audio/audio_recorder.h"
+#include "components/copresence/test/audio_test_support.h"
#include "components/copresence/test/stub_whispernet_client.h"
#include "media/base/audio_bus.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -63,12 +66,17 @@ class AudioRecorderStub final : public AudioRecorder {
class AudioManagerTest : public testing::Test {
public:
AudioManagerTest()
- : whispernet_client_(new StubWhispernetClient),
- audio_manager_(new AudioManagerImpl()),
+ : audio_manager_(new AudioManagerImpl()),
audible_player_(new AudioPlayerStub),
inaudible_player_(new AudioPlayerStub),
recorder_(new AudioRecorderStub),
last_received_decode_type_(AUDIO_TYPE_UNKNOWN) {
+ std::vector<AudioToken> tokens;
+ tokens.push_back(AudioToken("abcdef", true));
+ tokens.push_back(AudioToken("123456", false));
+ whispernet_client_.reset(new StubWhispernetClient(
+ CreateRandomAudioRefCounted(0x123, 1, 0x321), tokens));
+
audio_manager_->set_player_for_testing(AUDIBLE, audible_player_);
audio_manager_->set_player_for_testing(INAUDIBLE, inaudible_player_);
audio_manager_->set_recorder_for_testing(recorder_);
« no previous file with comments | « no previous file | components/copresence/test/audio_test_support.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698