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

Side by Side Diff: media/filters/audio_decoder_unittest.cc

Issue 662503003: Convert ARRAYSIZE_UNSAFE -> arraysize in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <deque> 5 #include <deque>
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/md5.h" 9 #include "base/md5.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 } 371 }
372 372
373 TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithNoCodecDelay) { 373 TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithNoCodecDelay) {
374 ASSERT_EQ(GetParam().decoder_type, OPUS); 374 ASSERT_EQ(GetParam().decoder_type, OPUS);
375 AudioDecoderConfig decoder_config; 375 AudioDecoderConfig decoder_config;
376 decoder_config.Initialize(kCodecOpus, 376 decoder_config.Initialize(kCodecOpus,
377 kSampleFormatF32, 377 kSampleFormatF32,
378 CHANNEL_LAYOUT_STEREO, 378 CHANNEL_LAYOUT_STEREO,
379 48000, 379 48000,
380 kOpusExtraData, 380 kOpusExtraData,
381 ARRAYSIZE_UNSAFE(kOpusExtraData), 381 arraysize(kOpusExtraData),
382 false, 382 false,
383 false, 383 false,
384 base::TimeDelta::FromMilliseconds(80), 384 base::TimeDelta::FromMilliseconds(80),
385 0); 385 0);
386 InitializeDecoder(decoder_config); 386 InitializeDecoder(decoder_config);
387 } 387 }
388 388
389 TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithBadCodecDelay) { 389 TEST_P(OpusAudioDecoderBehavioralTest, InitializeWithBadCodecDelay) {
390 ASSERT_EQ(GetParam().decoder_type, OPUS); 390 ASSERT_EQ(GetParam().decoder_type, OPUS);
391 AudioDecoderConfig decoder_config; 391 AudioDecoderConfig decoder_config;
392 decoder_config.Initialize( 392 decoder_config.Initialize(
393 kCodecOpus, 393 kCodecOpus,
394 kSampleFormatF32, 394 kSampleFormatF32,
395 CHANNEL_LAYOUT_STEREO, 395 CHANNEL_LAYOUT_STEREO,
396 48000, 396 48000,
397 kOpusExtraData, 397 kOpusExtraData,
398 ARRAYSIZE_UNSAFE(kOpusExtraData), 398 arraysize(kOpusExtraData),
399 false, 399 false,
400 false, 400 false,
401 base::TimeDelta::FromMilliseconds(80), 401 base::TimeDelta::FromMilliseconds(80),
402 // Use a different codec delay than in the extradata. 402 // Use a different codec delay than in the extradata.
403 100); 403 100);
404 InitializeDecoderWithStatus(decoder_config, DECODER_ERROR_NOT_SUPPORTED); 404 InitializeDecoderWithStatus(decoder_config, DECODER_ERROR_NOT_SUPPORTED);
405 } 405 }
406 406
407 TEST_P(FFmpegAudioDecoderBehavioralTest, InitializeWithBadConfig) { 407 TEST_P(FFmpegAudioDecoderBehavioralTest, InitializeWithBadConfig) {
408 const AudioDecoderConfig decoder_config(kCodecVorbis, 408 const AudioDecoderConfig decoder_config(kCodecVorbis,
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
522 }; 522 };
523 523
524 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest, 524 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderTest,
525 AudioDecoderTest, 525 AudioDecoderTest,
526 testing::ValuesIn(kFFmpegTests)); 526 testing::ValuesIn(kFFmpegTests));
527 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest, 527 INSTANTIATE_TEST_CASE_P(FFmpegAudioDecoderBehavioralTest,
528 FFmpegAudioDecoderBehavioralTest, 528 FFmpegAudioDecoderBehavioralTest,
529 testing::ValuesIn(kFFmpegBehavioralTest)); 529 testing::ValuesIn(kFFmpegBehavioralTest));
530 530
531 } // namespace media 531 } // namespace media
OLDNEW
« no previous file with comments | « media/base/seekable_buffer_unittest.cc ('k') | media/video/capture/win/video_capture_device_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698