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

Unified Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2623443002: Fix getUserMedia so that failure is reported for invalid audio sources. (Closed)
Patch Set: Address comments Created 3 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 side-by-side diff with in-line comments
Download patch
Index: content/shell/renderer/layout_test/blink_test_runner.cc
diff --git a/content/shell/renderer/layout_test/blink_test_runner.cc b/content/shell/renderer/layout_test/blink_test_runner.cc
index 155cff00948f4133540634676bb2e876af421217..cf81c8e824fc76a7492fa8f181940f94d0fe7590 100644
--- a/content/shell/renderer/layout_test/blink_test_runner.cc
+++ b/content/shell/renderer/layout_test/blink_test_runner.cc
@@ -208,14 +208,24 @@ class MockAudioCapturerSource : public media::AudioCapturerSource {
void Initialize(const media::AudioParameters& params,
CaptureCallback* callback,
- int session_id) override {}
- void Start() override {}
+ int session_id) override {
+ callback_ = callback;
+ }
+ void Start() override {
+ if (callback_)
+ callback_->OnCaptureStarted();
+ }
void Stop() override {}
void SetVolume(double volume) override {}
void SetAutomaticGainControl(bool enable) override {}
protected:
~MockAudioCapturerSource() override {}
+
+ private:
+ CaptureCallback* callback_ = nullptr;
+
+ DISALLOW_COPY_AND_ASSIGN(MockAudioCapturerSource);
};
// Tests in web-platform-tests use absolute path links such as
« no previous file with comments | « content/renderer/media/webrtc/webrtc_media_stream_adapter_unittest.cc ('k') | media/audio/audio_input_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698