blob: c3d253682484b825a6d2a863e33cf3563956aec1 [file] [log] [blame]
<script src="../../../resources/js-test-pre.js"></script>
<script>
if (window.internals) {
var statefulTypes = ['hidden', 'text', 'tel', 'url', 'email', 'number', 'range', 'checkbox',
'radio', 'file', 'select-one', 'select-multiple', 'textarea'];
var statelessTypes = ['fieldset', 'password', 'submit', 'reset', 'button', 'keygen', 'output'];
var states = internals.formControlStateOfPreviousHistoryItem();
for (var i = 0; i < statefulTypes.length; ++i) {
if (states.indexOf(statefulTypes[i]) >= 0)
testPassed('There is a state for ' + statefulTypes[i]);
else
testFailed('There no state for ' + statefulTypes[i]);
}
for (var i = 0; i < statelessTypes.length; ++i) {
if (states.indexOf(statelessTypes[i]) < 0)
testPassed('There is no state for ' + statelessTypes[i]);
else
testFailed('There is a state for ' + statelessTypes[i]);
}
}
jsTestIsAsync = true;
finishJSTest();
</script>
<script src="../../../resources/js-test-post.js"></script>