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

Side by Side Diff: content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc

Issue 2578983003: Add AudioStreamRegistry. Move stream counting logic (Closed)
Patch Set: Remove active audio tracking from ARH to see what tests break. 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
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/browser/renderer_host/media/audio_input_renderer_host.h" 5 #include "content/browser/renderer_host/media/audio_input_renderer_host.h"
6 6
7 #include <utility> 7 #include <utility>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 namespace content { 46 namespace content {
47 47
48 namespace { 48 namespace {
49 49
50 const int kStreamId = 100; 50 const int kStreamId = 100;
51 const int kRenderProcessId = 42; 51 const int kRenderProcessId = 42;
52 const int kRendererPid = 21718; 52 const int kRendererPid = 21718;
53 const int kRenderFrameId = 31415; 53 const int kRenderFrameId = 31415;
54 const int kSharedMemoryCount = 11; 54 const int kSharedMemoryCount = 11;
55 const char kSecurityOrigin[] = "http://localhost"; 55 const char kSecurityOrigin[] = "http://localhost";
56 #if BUILDFLAG(ENABLE_WEBRTC)
56 #if defined(OS_WIN) 57 #if defined(OS_WIN)
57 const wchar_t kBaseFileName[] = L"some_file_name"; 58 const wchar_t kBaseFileName[] = L"some_file_name";
58 #else 59 #else
59 const char kBaseFileName[] = "some_file_name"; 60 const char kBaseFileName[] = "some_file_name";
60 #endif 61 #endif
62 #endif // BUILDFLAG(ENABLE_WEBRTC)
61 63
62 url::Origin SecurityOrigin() { 64 url::Origin SecurityOrigin() {
63 return url::Origin(GURL(kSecurityOrigin)); 65 return url::Origin(GURL(kSecurityOrigin));
64 } 66 }
65 67
66 AudioInputHostMsg_CreateStream_Config DefaultConfig() { 68 AudioInputHostMsg_CreateStream_Config DefaultConfig() {
67 AudioInputHostMsg_CreateStream_Config config; 69 AudioInputHostMsg_CreateStream_Config config;
68 config.params = media::AudioParameters::UnavailableDeviceParams(); 70 config.params = media::AudioParameters::UnavailableDeviceParams();
69 config.automatic_gain_control = false; 71 config.automatic_gain_control = false;
70 config.shared_memory_count = kSharedMemoryCount; 72 config.shared_memory_count = kSharedMemoryCount;
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
548 EXPECT_CALL(controller_factory_, ControllerCreated()); 550 EXPECT_CALL(controller_factory_, ControllerCreated());
549 551
550 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( 552 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream(
551 kStreamId, kRenderFrameId, session_id, DefaultConfig())); 553 kStreamId, kRenderFrameId, session_id, DefaultConfig()));
552 base::RunLoop().RunUntilIdle(); 554 base::RunLoop().RunUntilIdle();
553 555
554 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); 556 EXPECT_CALL(*controller_factory_.controller(0), Close(_));
555 } 557 }
556 558
557 } // namespace content 559 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/BUILD.gn ('k') | content/browser/renderer_host/media/audio_renderer_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698