Index: content/renderer/media/media_stream_impl_unittest.cc |
diff --git a/content/renderer/media/media_stream_impl_unittest.cc b/content/renderer/media/media_stream_impl_unittest.cc |
index 05ae9c061d0b677b1bce9fa19b0b2d7dab081dc8..16b464b6a12b16e16f7b91da3bb411ac1c49fff7 100644 |
--- a/content/renderer/media/media_stream_impl_unittest.cc |
+++ b/content/renderer/media/media_stream_impl_unittest.cc |
@@ -56,9 +56,10 @@ class MediaStreamImplUnderTest : public MediaStreamImpl { |
virtual void CompleteGetUserMediaRequest( |
const blink::WebMediaStream& stream, |
blink::WebUserMediaRequest* request_info, |
- bool request_succeeded) OVERRIDE { |
+ content::MediaStreamRequestResult result) OVERRIDE { |
last_generated_stream_ = stream; |
- state_ = request_succeeded ? REQUEST_SUCCEEDED : REQUEST_FAILED; |
+ result_ = result; |
+ state_ = (result == MEDIA_DEVICE_OK ? REQUEST_SUCCEEDED : REQUEST_FAILED); |
} |
virtual blink::WebMediaStream GetMediaStream( |
@@ -87,10 +88,12 @@ class MediaStreamImplUnderTest : public MediaStreamImpl { |
} |
RequestState request_state() const { return state_; } |
+ content::MediaStreamRequestResult error_reason() const { return result_; } |
private: |
blink::WebMediaStream last_generated_stream_; |
RequestState state_; |
+ content::MediaStreamRequestResult result_; |
MediaStreamDependencyFactory* factory_; |
MockMediaStreamVideoCapturerSource* video_source_; |
}; |
@@ -290,6 +293,8 @@ TEST_F(MediaStreamImplTest, MediaSourceFailToStart) { |
FailToStartMockedVideoSource(); |
EXPECT_EQ(MediaStreamImplUnderTest::REQUEST_FAILED, |
ms_impl_->request_state()); |
+ EXPECT_EQ(MEDIA_DEVICE_TRACK_START_FAILURE, |
+ ms_impl_->error_reason()); |
EXPECT_EQ(1, ms_dispatcher_->request_stream_counter()); |
EXPECT_EQ(1, ms_dispatcher_->stop_audio_device_counter()); |
EXPECT_EQ(1, ms_dispatcher_->stop_video_device_counter()); |