summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/textarea/textarea-checkValidity-crash.html
blob: 12c34142e670a355032f1cffbdf7e258fa89513b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<p id="description">Bug 45681: Assertion failure about dirty flag changes of textarea elements.</p>
<div id="console"></div>
<script>
var ta = document.createElement('textarea');
ta.setAttribute('maxlength', '1');
ta.value = 'abc'; // Make it dirty && invalid.
ta.checkValidity(); // This made an assertion failure.
testPassed('Not crashed.');

ta.value = 'a'; // Make it dirty && valid.
ta.defaultValue = 'abc'; // Make it non-dirty && invalid.
ta.checkValidity(); // This made an assertion fail.
testPassed('Not crashed.');
</script>
</body>
</html>