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

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: Rebase 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 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 627
628 browser_context_.reset(new TestBrowserContext()); 628 browser_context_.reset(new TestBrowserContext());
629 629
630 scoped_refptr<SiteInstance> site_instance = 630 scoped_refptr<SiteInstance> site_instance =
631 SiteInstance::Create(browser_context_.get()); 631 SiteInstance::Create(browser_context_.get());
632 SiteInstanceImpl::set_render_process_host_factory( 632 SiteInstanceImpl::set_render_process_host_factory(
633 render_process_host_factory_.get()); 633 render_process_host_factory_.get());
634 web_contents_.reset( 634 web_contents_.reset(
635 TestWebContents::Create(browser_context_.get(), site_instance.get())); 635 TestWebContents::Create(browser_context_.get(), site_instance.get()));
636 RenderFrameHost* const main_frame = web_contents_->GetMainFrame(); 636 RenderFrameHost* const main_frame = web_contents_->GetMainFrame();
637 device_.reset(WebContentsVideoCaptureDevice::Create( 637 device_ = WebContentsVideoCaptureDevice::Create(base::StringPrintf(
638 base::StringPrintf("web-contents-media-stream://%d:%d", 638 "web-contents-media-stream://%d:%d", main_frame->GetProcess()->GetID(),
639 main_frame->GetProcess()->GetID(), 639 main_frame->GetRoutingID()));
640 main_frame->GetRoutingID())));
641 640
642 base::RunLoop().RunUntilIdle(); 641 base::RunLoop().RunUntilIdle();
643 } 642 }
644 643
645 void TearDown() override { 644 void TearDown() override {
646 // Tear down in opposite order of set-up. 645 // Tear down in opposite order of set-up.
647 646
648 // The device is destroyed asynchronously, and will notify the 647 // The device is destroyed asynchronously, and will notify the
649 // CaptureTestSourceController when it finishes destruction. 648 // CaptureTestSourceController when it finishes destruction.
650 // Trigger this, and wait. 649 // Trigger this, and wait.
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
1260 for (int i = 0; i < 3; ++i) { 1259 for (int i = 0; i < 3; ++i) {
1261 SimulateRefreshFrameRequest(); 1260 SimulateRefreshFrameRequest();
1262 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN)); 1261 ASSERT_NO_FATAL_FAILURE(client_observer()->WaitForNextColor(SK_ColorGREEN));
1263 } 1262 }
1264 1263
1265 device()->StopAndDeAllocate(); 1264 device()->StopAndDeAllocate();
1266 } 1265 }
1267 1266
1268 } // namespace 1267 } // namespace
1269 } // namespace content 1268 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698