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

Unified Diff: content/renderer/media/media_stream_dispatcher_unittest.cc

Issue 11146008: remove VideoDeviceError and AudioDeviceError for media stream. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
Index: content/renderer/media/media_stream_dispatcher_unittest.cc
===================================================================
--- content/renderer/media/media_stream_dispatcher_unittest.cc (revision 161798)
+++ content/renderer/media/media_stream_dispatcher_unittest.cc (working copy)
@@ -37,9 +37,7 @@
public base::SupportsWeakPtr<MockMediaStreamDispatcherEventHandler> {
public:
MockMediaStreamDispatcherEventHandler()
- : request_id_(-1),
- audio_failed(false),
- video_failed(false) {}
+ : request_id_(-1) {}
virtual void OnStreamGenerated(
int request_id,
@@ -54,16 +52,6 @@
request_id_ = request_id;
}
- virtual void OnAudioDeviceFailed(const std::string& label,
- int index) OVERRIDE {
- audio_failed = true;
- }
-
- virtual void OnVideoDeviceFailed(const std::string& label,
- int index) OVERRIDE {
- video_failed = true;
- }
-
virtual void OnDevicesEnumerated(
int request_id,
const media_stream::StreamDeviceInfoArray& device_array) OVERRIDE {
@@ -88,8 +76,6 @@
int request_id_;
std::string label_;
- bool audio_failed;
- bool video_failed;
DISALLOW_COPY_AND_ASSIGN(MockMediaStreamDispatcherEventHandler);
};
@@ -375,19 +361,6 @@
EXPECT_EQ(handler->label_, stream_label1);
EXPECT_EQ(dispatcher->video_session_id(stream_label1, 0), kVideoSessionId);
- // Test failure of the video device.
- dispatcher->OnMessageReceived(
- MediaStreamHostMsg_VideoDeviceFailed(kRouteId, stream_label1, 0));
- EXPECT_EQ(handler->video_failed, true);
- EXPECT_EQ(handler->audio_failed, false);
- // Make sure the audio device still exist but not the video device.
- EXPECT_EQ(dispatcher->audio_session_id(stream_label1, 0), kAudioSessionId);
-
- // Test failure of the audio device.
- dispatcher->OnMessageReceived(
- MediaStreamHostMsg_AudioDeviceFailed(kRouteId, stream_label1, 0));
- EXPECT_EQ(handler->audio_failed, true);
-
// Stop stream1.
dispatcher->StopStream(stream_label1);
EXPECT_EQ(dispatcher->label_stream_map_.size(), size_t(0));
« no previous file with comments | « content/renderer/media/media_stream_dispatcher_eventhandler.h ('k') | content/renderer/media/media_stream_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698