1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML//EN">
4 <script src=
"../../resources/js-test.js"></script>
7 <p id=
"description"></p>
8 <div id=
"console"></div>
10 description('This test aims to check for rangeUnderflow flag with input fields');
12 var input
= document
.createElement('input');
14 function checkNotUnderflow(value
, min
, disabled
)
18 input
.disabled
= !!disabled
;
19 var underflow
= input
.validity
.rangeUnderflow
;
20 var resultText
= 'The value "' + input
.value
+ '" ' +
21 (underflow
? 'underflows' : 'doesn\'t underflow') +
22 ' the minimum value "' + input
.min
+ '"' + (disabled
? ' when disabled.' : '.');
24 testFailed(resultText
);
26 testPassed(resultText
);
29 // ----------------------------------------------------------------
31 input
.type
= 'text'; // No underflow for type=text.
32 checkNotUnderflow('99', '100');