blob: 6dd40cc9b0ea58c42d5c9a70f822f108263b8d1a [file] [log] [blame]
<!DOCTYPE html>
<meta charset='utf-8'>
<title>HTML Media Capture Test: capture_reflect</title>
<link rel='author' title='Intel' href=''>
<link rel='help' href=''>
<link rel='help' href=''>
<link rel='help' href=''>
<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>
<script src='/resources/testharnessreport.js'></script>
<pre style='display:none'>
partial interface HTMLInputElement {
attribute boolean capture;
<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>
<div id='log'></div>
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');
}, 'Element input should have own property capture');
test(function() {
}, 'input.capture is false when the capture attribute is absent');
test(function() {
}, 'input.capture is true when the capture attribute is present');
test(function() {
}, 'input.capture is true when the capture attribute is present as empty string');
test(function() {
}, 'input.capture is true when the capture attribute is present as canonical name');