mirror of
https://github.com/servo/servo.git
synced 2025-08-18 11:55:39 +01:00
Update web-platform-tests to revision 58eb04cecbbec2e18531ab440225e38944a9c444
This commit is contained in:
parent
25e8bf69e6
commit
665817d2a6
35333 changed files with 1818077 additions and 16036 deletions
|
@ -2,8 +2,8 @@
|
|||
<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'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<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'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture_fallback_file_upload</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html-media-capture/#the-capture-attribute'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html5/forms.html#file-upload-state-(type=file)'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://www.w3.org/TR/html5/forms.html#file-upload-state-(type=file)'>
|
||||
<meta name='flags' content='interact'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<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'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture image with 'environment' facing mode to produce one image file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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, the camera must be launched with viewing the environment mode.</p>
|
||||
|
||||
<p>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='environment'>
|
||||
|
||||
<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>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture image with implementation-specific default facing mode(invalid value default) to produce one image file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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, the camera must be launched with the default facing mode.</p>
|
||||
|
||||
<p>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='invalid'>
|
||||
|
||||
<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>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture image to produce one image file</title>
|
||||
<title>HTML Media Capture Test: capture image with implementation-specific default facing mode(missing value default) 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'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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>
|
||||
|
@ -11,7 +11,9 @@
|
|||
|
||||
<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>After hitting the button below, the camera must be launched with the default facing mode.</p>
|
||||
|
||||
<p>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>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture image with 'user' facing mode to produce one image file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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, the camera must be launched with self-view mode.</p>
|
||||
|
||||
<p>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='user'>
|
||||
|
||||
<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>
|
||||
|
|
@ -4,9 +4,7 @@
|
|||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture_reflect</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com/'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html-media-capture/#the-capture-attribute'>
|
||||
<link rel='help' href='http://www.w3.org/html/wg/drafts/html/CR/infrastructure.html#reflect'>
|
||||
<link rel='help' href='http://www.w3.org/html/wg/drafts/html/CR/infrastructure.html#boolean-attributes'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture/#the-capture-attribute'>
|
||||
<meta name='flags' content='dom'>
|
||||
<meta name='assert' content='Test checks that the capture IDL attribute must reflect the content attribute of the same name.'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
|
@ -15,43 +13,52 @@
|
|||
<body>
|
||||
<pre style='display:none'>
|
||||
partial interface HTMLInputElement {
|
||||
attribute boolean capture;
|
||||
attribute CaptureFacingMode capture;
|
||||
};
|
||||
enum CaptureFacingMode {
|
||||
"user",
|
||||
"environment"
|
||||
};
|
||||
</pre>
|
||||
|
||||
<div style='display:none'>
|
||||
<input id='absent' type='file' accept='image/*'>
|
||||
<input id='present' type='file' accept='image/*' capture>
|
||||
<input id='present-empty-string' type='file' accept='image/*' capture=''>
|
||||
<input id='present-canonical-name' type='file' accept='image/*' capture=capture>
|
||||
<input id='present-missing' type='file' accept='image/*' capture>
|
||||
<input id='present-user' type='file' accept='image/*' capture='user'>
|
||||
<input id='present-invalid' type='file' accept='image/*' capture='invalid'>
|
||||
<input id='present-environment' type='file' accept='image/*' capture='environment'>
|
||||
</div>
|
||||
|
||||
<div id='log'></div>
|
||||
|
||||
<script>
|
||||
test(function() {
|
||||
var inputs = document.querySelectorAll('input');
|
||||
for (var i=0, obj; i<inputs.length, obj=inputs[i]; i++) {
|
||||
assert_own_property(obj, 'capture');
|
||||
assert_equals(typeof obj.capture, 'boolean');
|
||||
let inputs = document.querySelectorAll('input');
|
||||
for (let i=0, obj; i<inputs.length, obj=inputs[i]; i++) {
|
||||
assert_true('capture' in obj);
|
||||
assert_equals(typeof obj.capture, 'string');
|
||||
}
|
||||
}, 'Element input should have own property capture');
|
||||
|
||||
test(function() {
|
||||
assert_false(document.querySelector('#absent').capture);
|
||||
}, 'input.capture is false when the capture attribute is absent');
|
||||
assert_equals(document.querySelector('#absent').capture, "");
|
||||
}, 'input.capture is "" when the capture attribute is absent');
|
||||
|
||||
test(function() {
|
||||
assert_true(document.querySelector('#present').capture);
|
||||
}, 'input.capture is true when the capture attribute is present');
|
||||
assert_equals(document.querySelector('#present-missing').capture, "");
|
||||
}, 'input.capture is "" when the capture attribute is missing value default');
|
||||
|
||||
test(function() {
|
||||
assert_true(document.querySelector('#present-empty-string').capture);
|
||||
}, 'input.capture is true when the capture attribute is present as empty string');
|
||||
assert_equals(document.querySelector('#present-user').capture, "user");
|
||||
}, 'input.capture is "user" when the capture attribute is user');
|
||||
|
||||
test(function() {
|
||||
assert_true(document.querySelector('#present-canonical-name').capture);
|
||||
}, 'input.capture is true when the capture attribute is present as canonical name');
|
||||
assert_equals(document.querySelector('#present-invalid').capture, "invalid");
|
||||
}, 'input.capture is "invalid" when the capture attribute is invalid value default');
|
||||
|
||||
test(function() {
|
||||
assert_equals(document.querySelector('#present-environment').capture, "environment");
|
||||
}, 'input.capture is "environment" when the capture attribute is environment');
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
<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'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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>
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture video with 'environment' facing mode to produce one video file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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, the camera must be launched with viewing the environment mode.</p>
|
||||
|
||||
<p>Capture a 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='environment'>
|
||||
|
||||
<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>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture video with implementation-specific default facing mode(invalid value default) to produce one video file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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, the camera must be launched with the default facing mode.</p>
|
||||
|
||||
<p>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='invalid'>
|
||||
|
||||
<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>
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture video to produce one video file</title>
|
||||
<title>HTML Media Capture Test: capture video with implementation-specific default facing mode(missing value default) 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'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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>
|
||||
|
@ -11,7 +11,9 @@
|
|||
|
||||
<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>After hitting the button below, the camera must be launched with the default facing mode.</p>
|
||||
|
||||
<p>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>
|
||||
|
|
@ -0,0 +1,39 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture Test: capture video with 'user' facing mode to produce one video file</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<link rel='help' href='https://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, the camera must be launched with self-view mode.</p>
|
||||
|
||||
<p>Capture a 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='user'>
|
||||
|
||||
<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>
|
||||
|
|
@ -4,8 +4,7 @@
|
|||
<meta charset='utf-8'>
|
||||
<title>HTML Media Capture IDL tests</title>
|
||||
<link rel='author' title='Intel' href='http://www.intel.com/'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html-media-capture/#conformance'>
|
||||
<link rel='help' href='http://www.w3.org/TR/html-media-capture/#the-capture-attribute'>
|
||||
<link rel='help' href='https://w3c.github.io/html-media-capture'>
|
||||
<script src='/resources/testharness.js'></script>
|
||||
<script src='/resources/testharnessreport.js'></script>
|
||||
<script src='/resources/WebIDLParser.js'></script>
|
||||
|
@ -26,12 +25,16 @@
|
|||
|
||||
<pre id='idl' style='display:none'>
|
||||
partial interface HTMLInputElement {
|
||||
attribute boolean capture;
|
||||
attribute CaptureFacingMode capture;
|
||||
};
|
||||
enum CaptureFacingMode {
|
||||
"user",
|
||||
"environment"
|
||||
};
|
||||
</pre>
|
||||
|
||||
<form style='display:none'>
|
||||
<input id='testElement' type='file' accept='image/*' capture>
|
||||
<input id='testElement' type='file' accept='image/*' capture="user">
|
||||
</form>
|
||||
|
||||
<script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue