function onPickerResult(audio_track_num, id, options) {
  chrome.test.assertEq("string", typeof id);
  chrome.test.assertTrue(id != "");
  var video_constraint = { mandatory: { chromeMediaSource: "desktop",
                                        chromeMediaSourceId: id } };
  var audio_constraint =
    options.canRequestAudioTrack ? video_constraint : false;

  navigator.mediaDevices.getUserMedia({
    audio: audio_constraint,
    video: video_constraint
  }).then(
    function(stream) {
      if (audio_track_num != null)
        chrome.test.assertEq(audio_track_num, stream.getAudioTracks().length);
      chrome.test.succeed();
  }).catch(chrome.test.fail);
}
// found in the LICENSE file.
found in the LICENSE file.
found in the LICENSE file .
function onPickerResult(audio_track_num, id, options) {
  chrome.test.assertEq("string", typeof id);
  chrome.test.assertTrue(id != "");
  var video_constraint = { mandatory: { chromeMediaSource: "desktop",
                                        chromeMediaSourceId: id } };
  var audio_constraint =
    options.canRequestAudioTrack ? video_constraint : false;
  navigator.mediaDevices.getUserMedia({
    audio: audio_constraint,
    video: video_constraint
  }).then(
    function(stream) {
      if (audio_track_num != null)
        chrome.test.assertEq(audio_track_num, stream.getAudioTracks().length);
      chrome.test.succeed();
  }).catch(chrome.test.fail);
}
function onPickerResult ( audio_track_num , id , options ) { chrome . test . assertEq ( "string" , typeof id ) ; chrome . test . assertTrue ( id != "" ) ; var video_constraint = { mandatory : { chromeMediaSource : "desktop" , chromeMediaSourceId : id } } ; var audio_constraint = options . canRequestAudioTrack ? video_constraint : false ; navigator . mediaDevices . getUserMedia ( { audio : audio_constraint , video : video_constraint } ) . then ( function ( stream ) { if ( audio_track_num != null ) chrome . test . assertEq ( audio_track_num , stream . getAudioTracks ( ) . length ) ; chrome . test . succeed ( ) ; } ) . catch ( chrome . test . fail ) ; }
found in the LICENSE file.
found in the LICENSE file .