Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for user denial of captured file #1618

Merged
merged 3 commits into from Feb 16, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
37 changes: 37 additions & 0 deletions html-media-capture/capture_audio-manual.html
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: capture audio to produce one audio file</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://dev.w3.org/2009/dap/camera/#attributes'>
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#attr-input-accept'>
<meta name='flags' content='interact'>
<meta name="timeout" content="long">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>

<p>Clear all microphone permissions before running this test. If prompted for permission, please allow.</p>

<p>After hitting the button below, capture an audio and then confirm the capturing.</p>

<p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>

<input type='file' accept='audio/*' capture>

<div id='log'></div>

<script>
var input;

setup(function() {
input = document.querySelector('input[type=file]');
}, {explicit_done: true});

async_test(function(t) {
input.onchange = t.step_func_done(function() {
assert_equals(input.files.length, 1, 'Should capture one file');
assert_regexp_match(input.files[0].type, /^audio\//, 'The captured file should be type of audio');
});
done();
});
</script>

24 changes: 24 additions & 0 deletions html-media-capture/capture_audio_cancel-manual.html
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: user denial of captured audio leading to no capture</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://dev.w3.org/2009/dap/camera/#attributes'>
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#attr-input-accept'>
<meta name='flags' content='interact'>

<p>Clear all microphone permissions before running this test. If prompted for permission, please allow.</p>

<p>After hitting the button below</p>

<ul>

<li>capture an audio and then cancel the capturing;</li>

<li>capture an audio and then confirm the capturing.</li>

</ul>

<p>Test passes if there is no captured audio saved to the system's data storage.</p>

<input type='file' accept='audio/*' capture>

37 changes: 37 additions & 0 deletions html-media-capture/capture_image-manual.html
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: capture image to produce one image file</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://dev.w3.org/2009/dap/camera/#attributes'>
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#attr-input-accept'>
<meta name='flags' content='interact'>
<meta name="timeout" content="long">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>

<p>Clear all camera permissions before running this test. If prompted for permission, please allow.</p>

<p>After hitting the button below, capture an image and then confirm the capturing.</p>

<p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>

<input type='file' accept='image/*' capture>

<div id='log'></div>

<script>
var input;

setup(function() {
input = document.querySelector('input[type=file]');
}, {explicit_done: true});

async_test(function(t) {
input.onchange = t.step_func_done(function() {
assert_equals(input.files.length, 1, 'Should capture one file');
assert_regexp_match(input.files[0].type, /^image\//, 'The captured file should be type of image');
});
done();
});
</script>

24 changes: 24 additions & 0 deletions html-media-capture/capture_image_cancel-manual.html
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: user denial of captured image leading to no capture</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://dev.w3.org/2009/dap/camera/#attributes'>
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#attr-input-accept'>
<meta name='flags' content='interact'>

<p>Clear all camera permissions before running this test. If prompted for permission, please allow.</p>

<p>After hitting the button below</p>

<ul>

<li>capture an image and then cancel the capturing;</li>

<li>capture an image and then confirm the capturing.</li>

</ul>

<p>Test passes if there is no captured image saved to the system's data storage.</p>

<input type='file' accept='image/*' capture>

37 changes: 37 additions & 0 deletions html-media-capture/capture_video-manual.html
@@ -0,0 +1,37 @@
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: capture video to produce one video file</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://dev.w3.org/2009/dap/camera/#attributes'>
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#attr-input-accept'>
<meta name='flags' content='interact'>
<meta name="timeout" content="long">
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>

<p>Clear all camera/microphone permissions before running this test. If prompted for permission, please allow.</p>

<p>After hitting the button below, capture an video and then confirm the capturing.</p>

<p>Note: All the actions need to be done in 60 seconds, otherwise it will get TIMEOUT.</p>

<input type='file' accept='video/*' capture>

<div id='log'></div>

<script>
var input;

setup(function() {
input = document.querySelector('input[type=file]');
}, {explicit_done: true});

async_test(function(t) {
input.onchange = t.step_func_done(function() {
assert_equals(input.files.length, 1, 'Should capture one file');
assert_regexp_match(input.files[0].type, /^video\//, 'The captured file should be type of video');
});
done();
});
</script>

24 changes: 24 additions & 0 deletions html-media-capture/capture_video_cancel-manual.html
@@ -0,0 +1,24 @@
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: user denial of captured video leading to no capture</title>
<link rel='author' title='Intel' href='http://www.intel.com'>
<link rel='help' href='http://dev.w3.org/2009/dap/camera/#attributes'>
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#attr-input-accept'>
<meta name='flags' content='interact'>

<p>Clear all camera/microphone permissions before running this test. If prompted for permission, please allow.</p>

<p>After hitting the button below</p>

<ul>

<li>capture an video and then cancel the capturing;</li>

<li>capture an video and then confirm the capturing.</li>

</ul>

<p>Test passes if there is no captured video saved to the system's data storage.</p>

<input type='file' accept='video/*' capture>