summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/setCustomValidity-existence.html
blob: 89498c817b4c90cfdde456d45685ff9412218f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<!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('Existence tests for .setCustomValidity property');

var parent = document.createElement('div');
document.body.appendChild(parent);

debug('Existence of .setCustomValidity');
parent.innerHTML = '<form>'
    + '<input name="victim"/>'
    + '<textarea name="victim"></textarea>'
    + '<fieldset name="victim">Test</fieldset>'
    + '<button name="victim">'
    + '<select name="victim"></select>'
    + '<output name="victim"></output>'
    + '<object name="victim"></object>'
    + '<keygen name="victim">'
    + '</form>';

shouldBe('typeof document.getElementsByTagName("input")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("button")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("fieldset")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("select")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("textarea")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("output")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("object")[0].setCustomValidity', '"function"');
shouldBe('typeof document.getElementsByTagName("keygen")[0].setCustomValidity', '"function"');
</script>
</body>
</html>