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

Side by Side Diff: media/audio/sounds/sounds_manager_unittest.cc

Issue 115693004: Added volume adjust sound behind the flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix, rebase. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « media/audio/sounds/sounds_manager.cc ('k') | media/audio/sounds/wav_audio_handler.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 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 <vector> 5 #include <vector>
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 ASSERT_TRUE(SoundsManager::Get()); 47 ASSERT_TRUE(SoundsManager::Get());
48 48
49 base::RunLoop run_loop; 49 base::RunLoop run_loop;
50 TestObserver observer(run_loop.QuitClosure()); 50 TestObserver observer(run_loop.QuitClosure());
51 51
52 SetObserverForTesting(&observer); 52 SetObserverForTesting(&observer);
53 53
54 ASSERT_TRUE(SoundsManager::Get()->Initialize( 54 ASSERT_TRUE(SoundsManager::Get()->Initialize(
55 kTestAudioKey, 55 kTestAudioKey,
56 base::StringPiece(kTestAudioData, arraysize(kTestAudioData)))); 56 base::StringPiece(kTestAudioData, arraysize(kTestAudioData))));
57 ASSERT_EQ(41, 57 ASSERT_EQ(20,
58 SoundsManager::Get()->GetDuration(kTestAudioKey).InMicroseconds()); 58 SoundsManager::Get()->GetDuration(kTestAudioKey).InMicroseconds());
59 ASSERT_TRUE(SoundsManager::Get()->Play(kTestAudioKey)); 59 ASSERT_TRUE(SoundsManager::Get()->Play(kTestAudioKey));
60 run_loop.Run(); 60 run_loop.Run();
61 61
62 ASSERT_EQ(1, observer.num_play_requests()); 62 ASSERT_EQ(1, observer.num_play_requests());
63 ASSERT_EQ(1, observer.num_stop_requests()); 63 ASSERT_EQ(1, observer.num_stop_requests());
64 ASSERT_EQ(4, observer.cursor()); 64 ASSERT_EQ(4, observer.cursor());
65 65
66 SetObserverForTesting(NULL); 66 SetObserverForTesting(NULL);
67 } 67 }
68 68
69 } // namespace media 69 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/sounds/sounds_manager.cc ('k') | media/audio/sounds/wav_audio_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698