<script src="../resources/testharnessreport.js"></script>
</head>
<body>
- <input id="a" type="file">
+ <input id="a" type="file" accept="image/*" capture>
<div id="log"></div>
<script>
var htmlInputElement = document.getElementById("a");
}, "Check if the type of HTMLInputElement is object");
test(function() {
- assert_true("capture" in htmlInputElement, "capture attribute in HTMLInputElement element");
+ assert_true("capture" in htmlInputElement.attributes, "capture attribute in HTMLInputElement element");
}, "Check if the HTMLInputElement.capture attribute exists");
test(function() {
- assert_equals(typeof htmlInputElement.capture, "string", "the type of capture attribute");
- }, "Check if the type of HTMLInputElement.capture is boolean");
+ assert_equals(typeof htmlInputElement.attributes.capture, "object", "the type of capture attribute");
+ }, "Check if the type of HTMLInputElement.capture is object");
</script>
</body>
</html>
<div id='log'></div>
<script>
test(function() {
- assert_equals(document.querySelector('#absent').capture, "", 'capture is false when the value is absent');
- }, 'input.capture is boolean when the capture attribute is absent');
+ assert_equals(document.querySelector('#absent').attributes.capture, undefined, 'capture is false when the value is absent');
+ }, 'input.capture is undefined when the capture attribute is absent');
test(function() {
- assert_equals(document.querySelector('#present').capture, "", 'capture is true when the value is present');
+ assert_equals(document.querySelector('#present').attributes.capture.value, "", 'capture is true when the value is present');
}, 'input.capture is correct when the capture attribute is present');
</script>
</body>