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

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

Issue 2646833002: Add IPC to query capabilities of video input devices. (Closed)
Patch Set: Created 3 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "content/renderer/media/media_devices_event_dispatcher.h" 5 #include "content/renderer/media/media_devices_event_dispatcher.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <string> 10 #include <string>
(...skipping 29 matching lines...) Expand all
40 bool request_video_input, 40 bool request_video_input,
41 bool request_audio_output, 41 bool request_audio_output,
42 const url::Origin& security_origin, 42 const url::Origin& security_origin,
43 const EnumerateDevicesCallback& callback)); 43 const EnumerateDevicesCallback& callback));
44 MOCK_METHOD3(SubscribeDeviceChangeNotifications, 44 MOCK_METHOD3(SubscribeDeviceChangeNotifications,
45 void(MediaDeviceType type, 45 void(MediaDeviceType type,
46 uint32_t subscription_id, 46 uint32_t subscription_id,
47 const url::Origin& security_origin)); 47 const url::Origin& security_origin));
48 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications, 48 MOCK_METHOD2(UnsubscribeDeviceChangeNotifications,
49 void(MediaDeviceType type, uint32_t subscription_id)); 49 void(MediaDeviceType type, uint32_t subscription_id));
50 MOCK_METHOD2(GetVideoInputCapabilities,
51 void(const url::Origin& security_origin,
52 const GetVideoInputCapabilitiesCallback& client_callback));
50 53
51 ::mojom::MediaDevicesDispatcherHostPtr CreateInterfacePtrAndBind() { 54 ::mojom::MediaDevicesDispatcherHostPtr CreateInterfacePtrAndBind() {
52 return binding_.CreateInterfacePtrAndBind(); 55 return binding_.CreateInterfacePtrAndBind();
53 } 56 }
54 57
55 private: 58 private:
56 mojo::Binding<::mojom::MediaDevicesDispatcherHost> binding_; 59 mojo::Binding<::mojom::MediaDevicesDispatcherHost> binding_;
57 }; 60 };
58 61
59 class MediaDevicesEventDispatcherTest : public ::testing::Test { 62 class MediaDevicesEventDispatcherTest : public ::testing::Test {
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 MediaDeviceType type = static_cast<MediaDeviceType>(i); 187 MediaDeviceType type = static_cast<MediaDeviceType>(i);
185 EXPECT_CALL( 188 EXPECT_CALL(
186 media_devices_dispatcher_, 189 media_devices_dispatcher_,
187 UnsubscribeDeviceChangeNotifications(type, subscription_list_2[type])); 190 UnsubscribeDeviceChangeNotifications(type, subscription_list_2[type]));
188 } 191 }
189 event_dispatcher_->UnsubscribeDeviceChangeNotifications(subscription_list_2); 192 event_dispatcher_->UnsubscribeDeviceChangeNotifications(subscription_list_2);
190 base::RunLoop().RunUntilIdle(); 193 base::RunLoop().RunUntilIdle();
191 } 194 }
192 195
193 } // namespace content 196 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698