summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/input-maxlength-unsupported.html
blob: d3e59e2776ee56b77e5e5bb24d99fe58b7521b32 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('A test for maxlength attribute of an input element with non-text type');

var input = document.createElement('input');
input.maxLength = 2;
input.type = 'number';
document.body.appendChild(input);
input.focus();
document.execCommand('insertText', false, '1234');
shouldBe('input.value', '"1234"');

input.parentNode.removeChild(input);
</script>
</body>
</html>