blob: 878a4fc6295a929b04adb4cf294d66c40f1e947d [file] [log] [blame]
Test basic getDisplayMedia prompting behavior
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 0
** Request an audio-only stream, the user should be prompted **
PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 1
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 0
** Request an video-only stream, the user should be prompted **
PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 2
PASS stream.getAudioTracks().length is 0
PASS stream.getVideoTracks().length is 1
** Request a stream with audio and video, the user should be prompted **
PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 3
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 1
** Request a stream with invalid constraints, the user should not be prompted **
PASS numberOfTimesGetUserMediaPromptHasBeenCalled() is 3
PASS stream is null
PASS err instanceof Error is true
PASS err.name is "InvalidAccessError"
PASS successfullyParsed is true
TEST COMPLETE