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

Side by Side Diff: content/renderer/media/media_stream_dispatcher_unittest.cc

Issue 348443002: Revert 274823 "Support for audio output devices for getMediaDevi..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2057/src/
Patch Set: Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <string> 5 #include <string>
6 6
7 #include "base/memory/ref_counted.h" 7 #include "base/memory/ref_counted.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 content::MediaStreamRequestResult result) OVERRIDE { 58 content::MediaStreamRequestResult result) OVERRIDE {
59 request_id_ = request_id; 59 request_id_ = request_id;
60 } 60 }
61 61
62 virtual void OnDeviceStopped(const std::string& label, 62 virtual void OnDeviceStopped(const std::string& label,
63 const StreamDeviceInfo& device_info) OVERRIDE { 63 const StreamDeviceInfo& device_info) OVERRIDE {
64 device_stopped_label_ = label; 64 device_stopped_label_ = label;
65 if (IsVideoMediaType(device_info.device.type)) { 65 if (IsVideoMediaType(device_info.device.type)) {
66 EXPECT_TRUE(StreamDeviceInfo::IsEqual(video_device_, device_info)); 66 EXPECT_TRUE(StreamDeviceInfo::IsEqual(video_device_, device_info));
67 } 67 }
68 if (IsAudioInputMediaType(device_info.device.type)) { 68 if (IsAudioMediaType(device_info.device.type)) {
69 EXPECT_TRUE(StreamDeviceInfo::IsEqual(audio_device_, device_info)); 69 EXPECT_TRUE(StreamDeviceInfo::IsEqual(audio_device_, device_info));
70 } 70 }
71 } 71 }
72 72
73 virtual void OnDevicesEnumerated( 73 virtual void OnDevicesEnumerated(
74 int request_id, 74 int request_id,
75 const StreamDeviceInfoArray& device_array) OVERRIDE { 75 const StreamDeviceInfoArray& device_array) OVERRIDE {
76 request_id_ = request_id; 76 request_id_ = request_id;
77 } 77 }
78 78
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 dispatcher_->OnMessageReceived( 402 dispatcher_->OnMessageReceived(
403 MediaStreamMsg_DeviceStopped(kRouteId, label, handler_->video_device_)); 403 MediaStreamMsg_DeviceStopped(kRouteId, label, handler_->video_device_));
404 // Verify that MediaStreamDispatcherEventHandler::OnDeviceStopped has been 404 // Verify that MediaStreamDispatcherEventHandler::OnDeviceStopped has been
405 // called. 405 // called.
406 EXPECT_EQ(label, handler_->device_stopped_label_); 406 EXPECT_EQ(label, handler_->device_stopped_label_);
407 EXPECT_EQ(dispatcher_->video_session_id(label, 0), 407 EXPECT_EQ(dispatcher_->video_session_id(label, 0),
408 StreamDeviceInfo::kNoId); 408 StreamDeviceInfo::kNoId);
409 } 409 }
410 410
411 } // namespace content 411 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dispatcher.cc ('k') | content/renderer/media/media_stream_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698