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

Side by Side Diff: media/audio/android/audio_android_unittest.cc

Issue 289073003: Bump up average_time_between_callback_ms for audio unittest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "base/android/build_info.h" 5 #include "base/android/build_info.h"
6 #include "base/basictypes.h" 6 #include "base/basictypes.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after
516 516
517 double average_time_between_callbacks_ms = 517 double average_time_between_callbacks_ms =
518 AverageTimeBetweenCallbacks(num_callbacks); 518 AverageTimeBetweenCallbacks(num_callbacks);
519 VLOG(0) << "expected time between callbacks: " 519 VLOG(0) << "expected time between callbacks: "
520 << expected_time_between_callbacks_ms << " ms"; 520 << expected_time_between_callbacks_ms << " ms";
521 VLOG(0) << "average time between callbacks: " 521 VLOG(0) << "average time between callbacks: "
522 << average_time_between_callbacks_ms << " ms"; 522 << average_time_between_callbacks_ms << " ms";
523 EXPECT_GE(average_time_between_callbacks_ms, 523 EXPECT_GE(average_time_between_callbacks_ms,
524 0.70 * expected_time_between_callbacks_ms); 524 0.70 * expected_time_between_callbacks_ms);
525 EXPECT_LE(average_time_between_callbacks_ms, 525 EXPECT_LE(average_time_between_callbacks_ms,
526 1.30 * expected_time_between_callbacks_ms); 526 1.35 * expected_time_between_callbacks_ms);
527 } 527 }
528 528
529 void GetDefaultOutputStreamParameters() { 529 void GetDefaultOutputStreamParameters() {
530 DCHECK(audio_manager()->GetTaskRunner()->BelongsToCurrentThread()); 530 DCHECK(audio_manager()->GetTaskRunner()->BelongsToCurrentThread());
531 audio_output_parameters_ = 531 audio_output_parameters_ =
532 audio_manager()->GetDefaultOutputStreamParameters(); 532 audio_manager()->GetDefaultOutputStreamParameters();
533 EXPECT_TRUE(audio_output_parameters_.IsValid()); 533 EXPECT_TRUE(audio_output_parameters_.IsValid());
534 } 534 }
535 535
536 void MakeOutputStream(const AudioParameters& params) { 536 void MakeOutputStream(const AudioParameters& params) {
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
979 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20)); 979 base::PlatformThread::Sleep(base::TimeDelta::FromSeconds(20));
980 printf("\n"); 980 printf("\n");
981 StopAndCloseAudioOutputStreamOnAudioThread(); 981 StopAndCloseAudioOutputStreamOnAudioThread();
982 StopAndCloseAudioInputStreamOnAudioThread(); 982 StopAndCloseAudioInputStreamOnAudioThread();
983 } 983 }
984 984
985 INSTANTIATE_TEST_CASE_P(AudioAndroidInputTest, AudioAndroidInputTest, 985 INSTANTIATE_TEST_CASE_P(AudioAndroidInputTest, AudioAndroidInputTest,
986 testing::ValuesIn(RunAudioRecordInputPathTests())); 986 testing::ValuesIn(RunAudioRecordInputPathTests()));
987 987
988 } // namespace media 988 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698