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

Side by Side Diff: media/audio/cras/cras_unified_unittest.cc

Issue 1911913002: Convert //media/audio from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 8 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
« no previous file with comments | « media/audio/cras/cras_unified.h ('k') | media/audio/fake_audio_input_stream.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 <stdint.h> 5 #include <stdint.h>
6 6
7 #include <memory>
7 #include <string> 8 #include <string>
8 9
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "base/run_loop.h" 11 #include "base/run_loop.h"
11 #include "base/synchronization/waitable_event.h" 12 #include "base/synchronization/waitable_event.h"
12 #include "base/test/test_message_loop.h" 13 #include "base/test/test_message_loop.h"
13 #include "base/test/test_timeouts.h" 14 #include "base/test/test_timeouts.h"
14 #include "base/thread_task_runner_handle.h" 15 #include "base/thread_task_runner_handle.h"
15 #include "base/time/time.h" 16 #include "base/time/time.h"
16 #include "media/audio/cras/audio_manager_cras.h" 17 #include "media/audio/cras/audio_manager_cras.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 return *(mock_manager_.get()); 92 return *(mock_manager_.get());
92 } 93 }
93 94
94 static const ChannelLayout kTestChannelLayout; 95 static const ChannelLayout kTestChannelLayout;
95 static const int kTestSampleRate; 96 static const int kTestSampleRate;
96 static const int kTestBitsPerSample; 97 static const int kTestBitsPerSample;
97 static const AudioParameters::Format kTestFormat; 98 static const AudioParameters::Format kTestFormat;
98 static const uint32_t kTestFramesPerPacket; 99 static const uint32_t kTestFramesPerPacket;
99 100
100 base::TestMessageLoop message_loop_; 101 base::TestMessageLoop message_loop_;
101 scoped_ptr<StrictMock<MockAudioManagerCras>, AudioManagerDeleter> 102 std::unique_ptr<StrictMock<MockAudioManagerCras>, AudioManagerDeleter>
102 mock_manager_; 103 mock_manager_;
103 104
104 private: 105 private:
105 DISALLOW_COPY_AND_ASSIGN(CrasUnifiedStreamTest); 106 DISALLOW_COPY_AND_ASSIGN(CrasUnifiedStreamTest);
106 }; 107 };
107 108
108 const ChannelLayout CrasUnifiedStreamTest::kTestChannelLayout = 109 const ChannelLayout CrasUnifiedStreamTest::kTestChannelLayout =
109 CHANNEL_LAYOUT_STEREO; 110 CHANNEL_LAYOUT_STEREO;
110 const int CrasUnifiedStreamTest::kTestSampleRate = 111 const int CrasUnifiedStreamTest::kTestSampleRate =
111 AudioParameters::kAudioCDSampleRate; 112 AudioParameters::kAudioCDSampleRate;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 163
163 // Wait for samples to be captured. 164 // Wait for samples to be captured.
164 EXPECT_TRUE(event.TimedWait(TestTimeouts::action_timeout())); 165 EXPECT_TRUE(event.TimedWait(TestTimeouts::action_timeout()));
165 166
166 test_stream->Stop(); 167 test_stream->Stop();
167 168
168 test_stream->Close(); 169 test_stream->Close();
169 } 170 }
170 171
171 } // namespace media 172 } // namespace media
OLDNEW
« no previous file with comments | « media/audio/cras/cras_unified.h ('k') | media/audio/fake_audio_input_stream.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698