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

Issue 2531333005: Unit tests of AudioInputRendererHost. Some cleanups. (Closed)

Created:
4 years ago by Max Morin
Modified:
4 years ago
CC:
audio-mojo-cl_google.com, chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, miu+watch_chromium.org, o1ka, posciak+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Unit tests of AudioInputRendererHost. Some cleanups. This change enables refactoring of AudioInputRendererHost and surrounding code. In this CL: * Cleaned up instances of handling DCHECK errors in AudioInputRendererHost, see style guide https://chromium.googlesource.com/chromium/src/+/master/styleguide/c++/c++.md#CHECK_DCHECK_and-NOTREACHED * Sanitize volume in AudioInputRendererHost::OnSetVolume. * Generalized AudioInputController::Factory interface and made sure the factory is used for all the factory methods of AudioInputController. * Removed skipping authorization check for fake devices in AudioInputRendendererHost * Removed unused weak_factory member of AudioInputRendererHost. * Added unit tests for AudioInputRendererHost. BUG=653861 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Committed: https://crrev.com/69cdc9514c495f7612463039885efeb8000d5184 Cr-Commit-Position: refs/heads/master@{#438539}

Patch Set 1 #

Patch Set 2 : Tab capture test. #

Patch Set 3 : . #

Total comments: 29

Patch Set 4 : . #

Patch Set 5 : Bad message. Handle flag in audio manager. #

Patch Set 6 : . #

Patch Set 7 : Windows compile. #

Total comments: 6

Patch Set 8 : Dale's comments. Windows compile. #

Total comments: 2

Patch Set 9 : Clamy's comments. #

Total comments: 4

Patch Set 10 : Small comments describing tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+654 lines, -94 lines) Patch
M content/browser/bad_message.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.h View 1 2 3 4 5 6 7 8 7 chunks +10 lines, -30 lines 0 comments Download
M content/browser/renderer_host/media/audio_input_renderer_host.cc View 1 2 3 4 5 6 7 8 12 chunks +44 lines, -60 lines 0 comments Download
A content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +571 lines, -0 lines 0 comments Download
M content/renderer/media/audio_input_message_filter.cc View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M media/audio/audio_input_controller.h View 1 2 3 4 5 6 7 2 chunks +4 lines, -2 lines 0 comments Download
M media/audio/audio_input_controller.cc View 1 2 3 3 chunks +16 lines, -2 lines 0 comments Download
M media/audio/test_audio_input_controller_factory.h View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M media/audio/test_audio_input_controller_factory.cc View 1 2 3 4 5 6 7 1 chunk +2 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 52 (25 generated)
Max Morin
Guido: PTAL at these tests, especially the tab capture stream test. Also, since you know ...
4 years ago (2016-12-01 10:33:18 UTC) #6
o1ka
Awesome, it's a perfect moment to write the tests, since we are going to make ...
4 years ago (2016-12-01 11:17:49 UTC) #7
Max Morin
I'll wait with making a new patch set until Guido has reviewed. https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc ...
4 years ago (2016-12-01 11:35:02 UTC) #8
Guido Urdaneta
I think you should remove the future cleanups from the description and file a bug ...
4 years ago (2016-12-02 10:22:25 UTC) #9
Max Morin
https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (left): https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc#oldcode192 content/browser/renderer_host/media/audio_input_renderer_host.cc:192: if (!PeerHandle()) { On 2016/12/02 10:22:25, Guido Urdaneta wrote: ...
4 years ago (2016-12-02 14:24:52 UTC) #10
Guido Urdaneta
https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (right): https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode310 content/browser/renderer_host/media/audio_input_renderer_host.cc:310: // Check if we have the permission to open ...
4 years ago (2016-12-02 14:56:01 UTC) #11
Max Morin
Guido: PTAL. https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (right): https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode310 content/browser/renderer_host/media/audio_input_renderer_host.cc:310: // Check if we have the permission ...
4 years ago (2016-12-05 14:11:16 UTC) #13
Guido Urdaneta
https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc File content/browser/renderer_host/media/audio_input_renderer_host.cc (right): https://codereview.chromium.org/2531333005/diff/40001/content/browser/renderer_host/media/audio_input_renderer_host.cc#newcode310 content/browser/renderer_host/media/audio_input_renderer_host.cc:310: // Check if we have the permission to open ...
4 years ago (2016-12-05 16:36:27 UTC) #14
Max Morin
How about still changing the format of the audio parameters to fake in AIRH, but ...
4 years ago (2016-12-06 07:45:15 UTC) #15
Guido Urdaneta
On 2016/12/06 07:45:15, Max Morin Chromium wrote: > How about still changing the format of ...
4 years ago (2016-12-06 12:37:35 UTC) #16
Max Morin
On 2016/12/06 12:37:35, Guido Urdaneta wrote: > On 2016/12/06 07:45:15, Max Morin Chromium wrote: > ...
4 years ago (2016-12-06 14:55:53 UTC) #18
Guido Urdaneta
On 2016/12/06 14:55:53, Max Morin Chromium wrote: > On 2016/12/06 12:37:35, Guido Urdaneta wrote: > ...
4 years ago (2016-12-06 15:07:09 UTC) #21
Max Morin
Dale: PTAL at these tests, and the changes listed in the description. There is a ...
4 years ago (2016-12-06 15:53:13 UTC) #27
DaleCurtis
lgtm % nits. https://codereview.chromium.org/2531333005/diff/120001/content/browser/renderer_host/media/audio_input_renderer_host.h File content/browser/renderer_host/media/audio_input_renderer_host.h (right): https://codereview.chromium.org/2531333005/diff/120001/content/browser/renderer_host/media/audio_input_renderer_host.h#newcode55 content/browser/renderer_host/media/audio_input_renderer_host.h:55: enum ErrorCode { Are these histogrammed? ...
4 years ago (2016-12-06 21:33:42 UTC) #30
Max Morin
https://codereview.chromium.org/2531333005/diff/120001/content/browser/renderer_host/media/audio_input_renderer_host.h File content/browser/renderer_host/media/audio_input_renderer_host.h (right): https://codereview.chromium.org/2531333005/diff/120001/content/browser/renderer_host/media/audio_input_renderer_host.h#newcode55 content/browser/renderer_host/media/audio_input_renderer_host.h:55: enum ErrorCode { On 2016/12/06 21:33:42, DaleCurtis wrote: > ...
4 years ago (2016-12-07 09:49:10 UTC) #31
johnkennady000
Wow ,this is a nice article.The language is so simple ,so everyone can understand.There are ...
4 years ago (2016-12-07 09:58:51 UTC) #32
clamy
Thanks for the cleanup! Here are a few comments below, I still need to do ...
4 years ago (2016-12-08 15:53:53 UTC) #33
Max Morin
Guido, Alexei, Clamy: Ping!
4 years ago (2016-12-12 07:52:02 UTC) #38
Guido Urdaneta
lgtm
4 years ago (2016-12-12 09:41:09 UTC) #39
clamy
Thanks! I've done a pass through the unit tests. I'm unfamiliar with the code though, ...
4 years ago (2016-12-12 15:16:37 UTC) #40
Alexei Svitkine (slow)
histograms.xml lgtm
4 years ago (2016-12-12 23:12:34 UTC) #41
Max Morin
On 2016/12/12 15:16:37, clamy wrote: > Thanks! I've done a pass through the unit tests. ...
4 years ago (2016-12-13 08:51:58 UTC) #42
Max Morin
Sorry, I realize I didn't publish my comments. https://codereview.chromium.org/2531333005/diff/160001/content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc File content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc (right): https://codereview.chromium.org/2531333005/diff/160001/content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc#newcode326 content/browser/renderer_host/media/audio_input_renderer_host_unittest.cc:326: TEST_F(AudioInputRendererHostTest, ...
4 years ago (2016-12-14 11:06:23 UTC) #43
clamy
Thanks! Lgtm.
4 years ago (2016-12-14 15:35:42 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2531333005/180001
4 years ago (2016-12-14 15:56:56 UTC) #47
commit-bot: I haz the power
Committed patchset #10 (id:180001)
4 years ago (2016-12-14 18:29:48 UTC) #50
commit-bot: I haz the power
4 years ago (2016-12-14 18:32:09 UTC) #52
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/69cdc9514c495f7612463039885efeb8000d5184
Cr-Commit-Position: refs/heads/master@{#438539}

Powered by Google App Engine
This is Rietveld 408576698