capture_video_invalid-manual.html (1446B)
1 <!DOCTYPE html> 2 <meta charset='utf-8'> 3 <title>HTML Media Capture Test: capture video with implementation-specific default facing mode(invalid value default) to produce one video file</title> 4 <link rel='author' title='Intel' href='http://www.intel.com'> 5 <link rel='help' href='https://w3c.github.io/html-media-capture'> 6 <link rel='help' href='https://www.w3.org/TR/html5/forms.html#attr-input-accept'> 7 <meta name='flags' content='interact'> 8 <meta name="timeout" content="long"> 9 <script src='/resources/testharness.js'></script> 10 <script src='/resources/testharnessreport.js'></script> 11 12 <p>Clear all camera/microphone permissions before running this test. If prompted for permission, please allow.</p> 13 14 <p>After hitting the button below, the camera must be launched with the default facing mode.</p> 15 16 <p>Capture an video and then confirm the capturing.</p> 17 18 <p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p> 19 20 <input type='file' accept='video/*' capture='invalid'> 21 22 <div id='log'></div> 23 24 <script> 25 var input; 26 27 setup(function() { 28 input = document.querySelector('input[type=file]'); 29 }, {explicit_done: true}); 30 31 async_test(function(t) { 32 input.onchange = t.step_func_done(function() { 33 assert_equals(input.files.length, 1, 'Should capture one file'); 34 assert_regexp_match(input.files[0].type, /^video\//, 'The captured file should be type of video'); 35 }); 36 done(); 37 }); 38 </script>