OLD | NEW |
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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 std::string device_stopped_label_; | 102 std::string device_stopped_label_; |
103 StreamDeviceInfo audio_device_; | 103 StreamDeviceInfo audio_device_; |
104 StreamDeviceInfo video_device_; | 104 StreamDeviceInfo video_device_; |
105 }; | 105 }; |
106 | 106 |
107 class MediaStreamDispatcherUnderTest : public MediaStreamDispatcher { | 107 class MediaStreamDispatcherUnderTest : public MediaStreamDispatcher { |
108 public: | 108 public: |
109 MediaStreamDispatcherUnderTest() : MediaStreamDispatcher(NULL) {} | 109 MediaStreamDispatcherUnderTest() : MediaStreamDispatcher(NULL) {} |
110 | 110 |
111 using MediaStreamDispatcher::GetNextIpcIdForTest; | 111 using MediaStreamDispatcher::GetNextIpcIdForTest; |
112 using RenderViewObserver::OnMessageReceived; | 112 using RenderFrameObserver::OnMessageReceived; |
113 }; | 113 }; |
114 | 114 |
115 class MediaStreamDispatcherTest : public ::testing::Test { | 115 class MediaStreamDispatcherTest : public ::testing::Test { |
116 public: | 116 public: |
117 MediaStreamDispatcherTest() | 117 MediaStreamDispatcherTest() |
118 : dispatcher_(new MediaStreamDispatcherUnderTest()), | 118 : dispatcher_(new MediaStreamDispatcherUnderTest()), |
119 handler_(new MockMediaStreamDispatcherEventHandler), | 119 handler_(new MockMediaStreamDispatcherEventHandler), |
120 security_origin_("http://test.com"), | 120 security_origin_("http://test.com"), |
121 request_id_(10) { | 121 request_id_(10) { |
122 } | 122 } |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
467 // Ducking should still be reported as not active. | 467 // Ducking should still be reported as not active. |
468 EXPECT_FALSE(dispatcher->IsAudioDuckingActive()); | 468 EXPECT_FALSE(dispatcher->IsAudioDuckingActive()); |
469 | 469 |
470 // Stop the device (removes the stream). | 470 // Stop the device (removes the stream). |
471 dispatcher->OnMessageReceived( | 471 dispatcher->OnMessageReceived( |
472 MediaStreamMsg_DeviceStopped(kRouteId, kStreamLabel, | 472 MediaStreamMsg_DeviceStopped(kRouteId, kStreamLabel, |
473 handler->audio_device_)); | 473 handler->audio_device_)); |
474 } | 474 } |
475 | 475 |
476 } // namespace content | 476 } // namespace content |
OLD | NEW |