blob: f8383b88faf731b007dd2522bc1b5ad82d5411d6 [file] [log] [blame]
Tests getUserMedia.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS navigator.getUserMedia({audio:false, video:false}, error, expectedError); did not throw exception.
PASS navigator.getUserMedia({audio:false, video:false}, error, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
PASS navigator.getUserMedia({audio:true}, gotStream1, error); did not throw exception.
PASS Error callback called.
PASS Stream generated.
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 0
PASS navigator.getUserMedia({video:true}, gotStream2, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
PASS navigator.getUserMedia({video:true}, gotStream2, error); did not throw exception.
PASS Stream generated.
PASS stream.getAudioTracks().length is 0
PASS stream.getVideoTracks().length is 1
PASS navigator.getUserMedia({audio:true, video:true}, gotStream3, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
PASS navigator.getUserMedia({audio:true, video:true}, gotStream3, error); did not throw exception.
PASS Stream generated.
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 1
PASS navigator.getUserMedia({audio:{}, video:true}, gotStream4, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
PASS navigator.getUserMedia({audio:{}, video:true}, gotStream4, error); did not throw exception.
PASS Stream generated.
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 1
PASS navigator.getUserMedia({audio:true, video:{width:{exact:11}}}, gotStreamInError, null); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
PASS navigator.getUserMedia({audio:true, video:{width:{exact:11}}}, gotStreamInError, error1); did not throw exception.
PASS Error callback called.
FAIL errorArg.name should be OverconstrainedError. Was Error.
PASS errorArg.message is "Invalid constraint"
PASS navigator.getUserMedia({audio:{volume:{exact:1}}, video:true}, gotStream5, 0); threw exception TypeError: Argument 3 ('errorCallback') to Navigator.getUserMedia must be a function.
PASS navigator.getUserMedia({audio:{volume:{exact:1}}, video:true}, gotStream5, error); did not throw exception.
PASS Stream generated.
PASS stream.getAudioTracks().length is 1
PASS stream.getVideoTracks().length is 1
PASS successfullyParsed is true
TEST COMPLETE