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

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

Issue 2622073003: Fix getUserMedia so that failure is reported for invalid audio sources. (Closed)
Patch Set: Change approach to be more conservative. Instead adapt OnAudioSourceStarted to the current design a… 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

Powered by Google App Engine
This is Rietveld 408576698