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

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: Add missing EXPECT_TRUE. Created 3 years, 12 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 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 <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 namespace content { 43 namespace content {
44 44
45 namespace { 45 namespace {
46 46
47 const int kStreamId = 100; 47 const int kStreamId = 100;
48 const int kRenderProcessId = 42; 48 const int kRenderProcessId = 42;
49 const int kRendererPid = 21718; 49 const int kRendererPid = 21718;
50 const int kRenderFrameId = 31415; 50 const int kRenderFrameId = 31415;
51 const int kSharedMemoryCount = 11; 51 const int kSharedMemoryCount = 11;
52 const char kSecurityOrigin[] = "http://localhost"; 52 const char kSecurityOrigin[] = "http://localhost";
53 #if BUILDFLAG(ENABLE_WEBRTC)
53 #if defined(OS_WIN) 54 #if defined(OS_WIN)
54 const wchar_t kBaseFileName[] = L"some_file_name"; 55 const wchar_t kBaseFileName[] = L"some_file_name";
55 #else 56 #else
56 const char kBaseFileName[] = "some_file_name"; 57 const char kBaseFileName[] = "some_file_name";
57 #endif 58 #endif
59 #endif // BUILDFLAG(ENABLE_WEBRTC)
58 60
59 url::Origin SecurityOrigin() { 61 url::Origin SecurityOrigin() {
60 return url::Origin(GURL(kSecurityOrigin)); 62 return url::Origin(GURL(kSecurityOrigin));
61 } 63 }
62 64
63 AudioInputHostMsg_CreateStream_Config DefaultConfig() { 65 AudioInputHostMsg_CreateStream_Config DefaultConfig() {
64 AudioInputHostMsg_CreateStream_Config config; 66 AudioInputHostMsg_CreateStream_Config config;
65 config.params = media::AudioParameters::UnavailableDeviceParams(); 67 config.params = media::AudioParameters::UnavailableDeviceParams();
66 config.automatic_gain_control = false; 68 config.automatic_gain_control = false;
67 config.shared_memory_count = kSharedMemoryCount; 69 config.shared_memory_count = kSharedMemoryCount;
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 EXPECT_CALL(controller_factory_, ControllerCreated()); 564 EXPECT_CALL(controller_factory_, ControllerCreated());
563 565
564 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream( 566 airh_->OnMessageReceived(AudioInputHostMsg_CreateStream(
565 kStreamId, kRenderFrameId, session_id, DefaultConfig())); 567 kStreamId, kRenderFrameId, session_id, DefaultConfig()));
566 base::RunLoop().RunUntilIdle(); 568 base::RunLoop().RunUntilIdle();
567 569
568 EXPECT_CALL(*controller_factory_.controller(0), Close(_)); 570 EXPECT_CALL(*controller_factory_.controller(0), Close(_));
569 } 571 }
570 572
571 } // namespace content 573 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698