summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/dom/Document/createElement-invalid-names.html
blob: e2fb8a688257d2cae00b4940ad631343def3be81 (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
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="../../../resources/js-test.js"></script>
</head>
<body>
<script>
description("Test various valid name for elements according to the definition of DOM Level 2.")

var nameList = [
                // Invalid first Char
                '0ascii',
                '.Ascii',
                '-Ascii',
                ' ascii',
                '	ascii',
                '֑sc.ii',
                '⃣scii',
                'िascii',
                'ʳascii',
                // Invalid other char
                'asc i',
                'asc	i',
                'asciiⅦ'
                ];

for (var i in nameList)
    shouldThrow("document.createElement('" + nameList[i] +"')");
</script>
</body>
</html>