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

Side by Side Diff: content/browser/renderer_host/media/media_stream_dispatcher_host_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 #include <queue> 6 #include <queue>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/callback_helpers.h" 9 #include "base/callback_helpers.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 message_loop_->PostTask(FROM_HERE, base::ResetAndReturn(&quit_closure)); 169 message_loop_->PostTask(FROM_HERE, base::ResetAndReturn(&quit_closure));
170 } 170 }
171 171
172 label_= ""; 172 label_= "";
173 } 173 }
174 174
175 void OnDeviceStoppedInternal(const std::string& label, 175 void OnDeviceStoppedInternal(const std::string& label,
176 const content::StreamDeviceInfo& device) { 176 const content::StreamDeviceInfo& device) {
177 if (IsVideoMediaType(device.device.type)) 177 if (IsVideoMediaType(device.device.type))
178 EXPECT_TRUE(StreamDeviceInfo::IsEqual(device, video_devices_[0])); 178 EXPECT_TRUE(StreamDeviceInfo::IsEqual(device, video_devices_[0]));
179 if (IsAudioInputMediaType(device.device.type)) 179 if (IsAudioMediaType(device.device.type))
180 EXPECT_TRUE(StreamDeviceInfo::IsEqual(device, audio_devices_[0])); 180 EXPECT_TRUE(StreamDeviceInfo::IsEqual(device, audio_devices_[0]));
181 181
182 OnDeviceStopped(current_ipc_->routing_id()); 182 OnDeviceStopped(current_ipc_->routing_id());
183 } 183 }
184 184
185 void OnDeviceOpenedInternal(int request_id, 185 void OnDeviceOpenedInternal(int request_id,
186 const std::string& label, 186 const std::string& label,
187 const StreamDeviceInfo& device) { 187 const StreamDeviceInfo& device) {
188 base::Closure quit_closure = quit_closures_.front(); 188 base::Closure quit_closure = quit_closures_.front();
189 quit_closures_.pop(); 189 quit_closures_.pop();
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevicesNoAccess) { 900 TEST_F(MediaStreamDispatcherHostTest, EnumerateVideoDevicesNoAccess) {
901 MockResourceContext* mock_resource_context = 901 MockResourceContext* mock_resource_context =
902 static_cast<MockResourceContext*>(browser_context_.GetResourceContext()); 902 static_cast<MockResourceContext*>(browser_context_.GetResourceContext());
903 mock_resource_context->set_camera_access(false); 903 mock_resource_context->set_camera_access(false);
904 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId, 904 EnumerateDevicesAndWaitForResult(kRenderId, kPageRequestId,
905 MEDIA_DEVICE_VIDEO_CAPTURE); 905 MEDIA_DEVICE_VIDEO_CAPTURE);
906 EXPECT_TRUE(DoesNotContainLabels(host_->enumerated_devices_)); 906 EXPECT_TRUE(DoesNotContainLabels(host_->enumerated_devices_));
907 } 907 }
908 908
909 }; // namespace content 909 }; // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698