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

Side by Side Diff: media/audio/audio_output_proxy_unittest.cc

Issue 2060833002: Implementation of 'AudioContext.getOutputTimestamp' method (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implementation of 'AudioContext.getOutputTimestamp' method Created 4 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 <memory>
8 #include <string> 8 #include <string>
9 9
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 const std::string& device_id, const AudioParameters& params)); 135 const std::string& device_id, const AudioParameters& params));
136 136
137 private: 137 private:
138 media::FakeAudioLogFactory fake_audio_log_factory_; 138 media::FakeAudioLogFactory fake_audio_log_factory_;
139 }; 139 };
140 140
141 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback { 141 class MockAudioSourceCallback : public AudioOutputStream::AudioSourceCallback {
142 public: 142 public:
143 int OnMoreData(AudioBus* audio_bus, 143 int OnMoreData(AudioBus* audio_bus,
144 uint32_t total_bytes_delay, 144 uint32_t total_bytes_delay,
145 uint32_t frames_skipped) { 145 uint32_t frames_skipped,
146 const media::AudioTimestamp& output_timestamp) {
146 audio_bus->Zero(); 147 audio_bus->Zero();
147 return audio_bus->frames(); 148 return audio_bus->frames();
148 } 149 }
149 MOCK_METHOD1(OnError, void(AudioOutputStream* stream)); 150 MOCK_METHOD1(OnError, void(AudioOutputStream* stream));
150 }; 151 };
151 152
152 } // namespace 153 } // namespace
153 154
154 namespace media { 155 namespace media {
155 156
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
740 .WillOnce(Return(&real_stream)); 741 .WillOnce(Return(&real_stream));
741 742
742 // Stream1 should be able to successfully open and start. 743 // Stream1 should be able to successfully open and start.
743 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true)); 744 EXPECT_CALL(real_stream, Open()).WillOnce(Return(true));
744 proxy = new AudioOutputProxy(resampler_.get()); 745 proxy = new AudioOutputProxy(resampler_.get());
745 EXPECT_TRUE(proxy->Open()); 746 EXPECT_TRUE(proxy->Open());
746 CloseAndWaitForCloseTimer(proxy, &real_stream); 747 CloseAndWaitForCloseTimer(proxy, &real_stream);
747 } 748 }
748 749
749 } // namespace media 750 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698