Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!doctype html>
<title>Historical forms features should not be supported</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id=log></div>
<form id=form hidden>
<label id=label></label>
<input id=input>
<button id=button></button>
<select id=select>
<optgroup id=optgroup>
<option id=option>
</select>
<datalist id=datalist></datalist>
<textarea id=textarea></textarea>
<progress id=progress></progress>
<meter id=meter></meter>
<fieldset id=fieldset>
<legend id=legend></legend>
</fieldset>
</form>
<form hidden action="isindex-support.txt" target=isindex_iframe id=isindex_form>
<input name=isindex value=x>
<iframe name=isindex_iframe id=isindex_iframe></iframe>
</form>
<script>
var tags = ['form', 'label', 'input', 'button', 'select', 'datalist',
'optgroup', 'option', 'textarea', 'progress', 'meter', 'fieldset', 'legend'];
function t(property, tagName) {
var tagNames = tagName ? [tagName] : tags;
tagNames.forEach(function(tagName) {
test(function() {
assert_false(property in document.getElementById(tagName));
}, tagName + '.' + property + ' should not be supported');
});
}
function inputType(type) {
test(function() {
var input = document.createElement('input');
input.type = type;
assert_equals(input.type, 'text');
}, '<input type=' + type + '> should not be supported');
}
// <input type=range multiple>
t('valueLow', 'input');
t('valueHigh', 'input');
// requestAutoComplete()
t('requestAutocomplete', 'form');
t('onautocomplete', 'form');
t('onautocompleteerror', 'form');
// <input type=datetime>
// added in WF2
inputType('datetime');
// <progress form>, <meter form>
t('form', 'progress');
t('form', 'meter');
// form.item(), form.namedItem()
t('item', 'form');
t('namedItem', 'form');
// Never specified but implemented in WebKit/Chromium
test(() => {
assert_false("onsearch" in window);
}, "window.onsearch should not be supported");
test(() => {
assert_false("onsearch" in document);
}, "document.onsearch should not be supported");
t('onsearch', 'input');
t('incremental', 'input');
// <input name=isindex>
async_test(function() {
var iframe = document.getElementById('isindex_iframe');
iframe.onload = this.step_func_done(function() {
assert_regexp_match(iframe.contentWindow.location.href, /\?isindex=x$/);
});
document.getElementById('isindex_form').submit();
}, '<input name=isindex> should not be supported');
</script>