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

Side by Side Diff: content/browser/media/capture/web_contents_video_capture_device_unittest.cc

Issue 2291893002: Let Contraints Controll Mute/Unmute Audio Local Playback For Desktop Sharing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nit Created 4 years, 2 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 (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 "content/browser/media/capture/web_contents_video_capture_device.h" 5 #include "content/browser/media/capture/web_contents_video_capture_device.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <utility> 10 #include <utility>
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 611
612 browser_context_.reset(new TestBrowserContext()); 612 browser_context_.reset(new TestBrowserContext());
613 613
614 scoped_refptr<SiteInstance> site_instance = 614 scoped_refptr<SiteInstance> site_instance =
615 SiteInstance::Create(browser_context_.get()); 615 SiteInstance::Create(browser_context_.get());
616 SiteInstanceImpl::set_render_process_host_factory( 616 SiteInstanceImpl::set_render_process_host_factory(
617 render_process_host_factory_.get()); 617 render_process_host_factory_.get());
618 web_contents_.reset( 618 web_contents_.reset(
619 TestWebContents::Create(browser_context_.get(), site_instance.get())); 619 TestWebContents::Create(browser_context_.get(), site_instance.get()));
620 RenderFrameHost* const main_frame = web_contents_->GetMainFrame(); 620 RenderFrameHost* const main_frame = web_contents_->GetMainFrame();
621 device_.reset(WebContentsVideoCaptureDevice::Create( 621 device_ = WebContentsVideoCaptureDevice::Create(base::StringPrintf(
622 base::StringPrintf("web-contents-media-stream://%d:%d", 622 "web-contents-media-stream://%d:%d", main_frame->GetProcess()->GetID(),
623 main_frame->GetProcess()->GetID(), 623 main_frame->GetRoutingID()));
624 main_frame->GetRoutingID())));
625 624
626 base::RunLoop().RunUntilIdle(); 625 base::RunLoop().RunUntilIdle();
627 } 626 }
628 627
629 void TearDown() override { 628 void TearDown() override {
630 // Tear down in opposite order of set-up. 629 // Tear down in opposite order of set-up.
631 630
632 // The device is destroyed asynchronously, and will notify the 631 // The device is destroyed asynchronously, and will notify the
633 // CaptureTestSourceController when it finishes destruction. 632 // CaptureTestSourceController when it finishes destruction.
634 // Trigger this, and wait. 633 // Trigger this, and wait.
(...skipping 574 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 for (int i = 0; i < 3; ++i) { 1208 for (int i = 0; i < 3; ++i) {
1210 SimulateRefreshFrameRequest(); 1209 SimulateRefreshFrameRequest();
1211 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); 1210 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN));
1212 } 1211 }
1213 1212
1214 device()->StopAndDeAllocate(); 1213 device()->StopAndDeAllocate();
1215 } 1214 }
1216 1215
1217 } // namespace 1216 } // namespace
1218 } // namespace content 1217 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698