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

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

Issue 11446042: Make sure that all OpenDevice requests are scrutinized against the audio and video policies. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased again... Created 8 years 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 int dummy_render_process_id = 1; 55 int dummy_render_process_id = 1;
56 int dummy_render_view_id = 1; 56 int dummy_render_view_id = 1;
57 StreamOptions components( 57 StreamOptions components(
58 audio ? MEDIA_DEVICE_AUDIO_CAPTURE : MEDIA_NO_SERVICE, 58 audio ? MEDIA_DEVICE_AUDIO_CAPTURE : MEDIA_NO_SERVICE,
59 video ? MEDIA_DEVICE_VIDEO_CAPTURE : MEDIA_NO_SERVICE); 59 video ? MEDIA_DEVICE_VIDEO_CAPTURE : MEDIA_NO_SERVICE);
60 GURL security_origin; 60 GURL security_origin;
61 ui_controller_->MakeUIRequest(label, 61 ui_controller_->MakeUIRequest(label,
62 dummy_render_process_id, 62 dummy_render_process_id,
63 dummy_render_view_id, 63 dummy_render_view_id,
64 components, 64 components,
65 security_origin); 65 security_origin,
66 MEDIA_GENERATE_STREAM);
66 } 67 }
67 68
68 scoped_ptr<MessageLoop> message_loop_; 69 scoped_ptr<MessageLoop> message_loop_;
69 scoped_ptr<BrowserThreadImpl> ui_thread_; 70 scoped_ptr<BrowserThreadImpl> ui_thread_;
70 scoped_ptr<BrowserThreadImpl> io_thread_; 71 scoped_ptr<BrowserThreadImpl> io_thread_;
71 scoped_ptr<MediaStreamUIController> ui_controller_; 72 scoped_ptr<MediaStreamUIController> ui_controller_;
72 73
73 private: 74 private:
74 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceUIControllerTest); 75 DISALLOW_COPY_AND_ASSIGN(MediaStreamDeviceUIControllerTest);
75 }; 76 };
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 142
142 // Remove the last request which is pending in the queue. 143 // Remove the last request which is pending in the queue.
143 ui_controller_->CancelUIRequest(label_3); 144 ui_controller_->CancelUIRequest(label_3);
144 145
145 // We should get callbacks from the rest of the requests. 146 // We should get callbacks from the rest of the requests.
146 EXPECT_CALL(*this, DevicesAccepted(label_1, _)); 147 EXPECT_CALL(*this, DevicesAccepted(label_1, _));
147 EXPECT_CALL(*this, DevicesAccepted(label_2, _)); 148 EXPECT_CALL(*this, DevicesAccepted(label_2, _));
148 } 149 }
149 150
150 } // namespace content 151 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/media/media_stream_ui_controller.cc ('k') | content/public/common/media_stream_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698