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

Unified Diff: content/test/data/media/getusermedia.html

Issue 2922733002: Propagate muted state from MediaStreamAudioSource into JS. (Closed)
Patch Set: Made SetMuted call unconditional. Rebased. Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_stream_source.cc ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/getusermedia.html
diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html
index 49b2beced94c9c58e83ad4489b6fce70fd80393b..e39912f06670b6380026a0016b87689c807435f7 100644
--- a/content/test/data/media/getusermedia.html
+++ b/content/test/data/media/getusermedia.html
@@ -63,6 +63,33 @@
function(error) { sendValueToTest(error.name); });
}
+ // Requests getusermedia and sets it up to test audio muting callbacks.
+ function getUserMediaForAudioMutingTest(initial_muted_state) {
+ console.log('Calling getUserMediaForAudioMutingTest.');
+ navigator.webkitGetUserMedia(
+ {audio: true},
+ function (stream) {
+ var track = stream.getAudioTracks()[0];
+ track.onmute = function(event) {
+ cancelTestTimeout();
+ sendValueToTest("onmute: muted="+ track.muted.toString() +
+ ", readyState=" + track.readyState);
+ }
+ track.onunmute = function(event) {
+ cancelTestTimeout();
+ sendValueToTest("onunmute: muted="+ track.muted.toString() +
+ ", readyState=" + track.readyState);
+ }
+ if (track.muted == initial_muted_state) {
+ reportTestSuccess();
+ } else {
+ failTest("Expected track.muted to be: " + initial_muted_state +
+ ", was: " + track.muted);
+ }
+ },
+ failedCallback);
+ }
+
function renderClonedMediastreamAndStop(constraints, waitTimeInSeconds) {
console.log('Calling renderClonedMediastreamAndStop.');
navigator.webkitGetUserMedia(
« no previous file with comments | « content/renderer/media/media_stream_source.cc ('k') | content/test/data/media/webrtc_test_utilities.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698