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

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

Issue 364123002: [Cross-Site Isolation] Migrate entire MediaStream verticals to be per-RenderFrame. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: It's random enough. + REBASE Created 6 years, 5 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/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
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
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
OLDNEW
« no previous file with comments | « content/renderer/media/media_stream_dispatcher.cc ('k') | content/renderer/media/media_stream_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698