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

Side by Side Diff: content/browser/renderer_host/media/media_stream_ui_controller_unittest.cc

Issue 11783059: Ensures that WebRTC works for device selection using a different sample rate than default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix after review from Chris Created 7 years, 11 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/bind.h" 7 #include "base/bind.h"
8 #include "base/message_loop.h" 8 #include "base/message_loop.h"
9 #include "content/browser/browser_thread_impl.h" 9 #include "content/browser/browser_thread_impl.h"
10 #include "content/browser/renderer_host/media/media_stream_ui_controller.h" 10 #include "content/browser/renderer_host/media/media_stream_ui_controller.h"
(...skipping 13 matching lines...) Expand all
24 public: 24 public:
25 MediaStreamDeviceUIControllerTest() {} 25 MediaStreamDeviceUIControllerTest() {}
26 26
27 // Mock implementation of SettingsRequester; 27 // Mock implementation of SettingsRequester;
28 MOCK_METHOD2(DevicesAccepted, void( 28 MOCK_METHOD2(DevicesAccepted, void(
29 const std::string&, const StreamDeviceInfoArray&)); 29 const std::string&, const StreamDeviceInfoArray&));
30 MOCK_METHOD1(SettingsError, void(const std::string&)); 30 MOCK_METHOD1(SettingsError, void(const std::string&));
31 void GetAvailableDevices(MediaStreamDevices* devices) OVERRIDE { 31 void GetAvailableDevices(MediaStreamDevices* devices) OVERRIDE {
32 devices->push_back(MediaStreamDevice(MEDIA_DEVICE_AUDIO_CAPTURE, 32 devices->push_back(MediaStreamDevice(MEDIA_DEVICE_AUDIO_CAPTURE,
33 "mic", 33 "mic",
34 "mic_id")); 34 "mic_id",
35 0,
36 0));
35 devices->push_back(MediaStreamDevice(MEDIA_DEVICE_VIDEO_CAPTURE, 37 devices->push_back(MediaStreamDevice(MEDIA_DEVICE_VIDEO_CAPTURE,
36 "camera", 38 "camera",
37 "camera_id")); 39 "camera_id"));
38 } 40 }
39 41
40 protected: 42 protected:
41 virtual void SetUp() { 43 virtual void SetUp() {
42 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO)); 44 message_loop_.reset(new MessageLoop(MessageLoop::TYPE_IO));
43 ui_thread_.reset(new BrowserThreadImpl(BrowserThread::UI, 45 ui_thread_.reset(new BrowserThreadImpl(BrowserThread::UI,
44 message_loop_.get())); 46 message_loop_.get()));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 145
144 // Remove the last request which is pending in the queue. 146 // Remove the last request which is pending in the queue.
145 ui_controller_->CancelUIRequest(label_3); 147 ui_controller_->CancelUIRequest(label_3);
146 148
147 // We should get callbacks from the rest of the requests. 149 // We should get callbacks from the rest of the requests.
148 EXPECT_CALL(*this, DevicesAccepted(label_1, _)); 150 EXPECT_CALL(*this, DevicesAccepted(label_1, _));
149 EXPECT_CALL(*this, DevicesAccepted(label_2, _)); 151 EXPECT_CALL(*this, DevicesAccepted(label_2, _));
150 } 152 }
151 153
152 } // namespace content 154 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_ui_controller.cc ('k') | content/common/media/media_stream_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698