OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
5 <script src="../../js/resources/js-test-pre.js"></script> | 5 <script src="../../../resources/js-test.js"></script> |
6 </head> | 6 </head> |
7 <body> | 7 <body> |
8 <script> | 8 <script> |
9 description("Test various valid name for elements according to the definition of
DOM Level 2.") | 9 description("Test various valid name for elements according to the definition of
DOM Level 2.") |
10 | 10 |
11 var nameList = [ | 11 var nameList = [ |
12 // Invalid first Char | 12 // Invalid first Char |
13 '0ascii', | 13 '0ascii', |
14 '.Ascii', | 14 '.Ascii', |
15 '-Ascii', | 15 '-Ascii', |
16 ' ascii', | 16 ' ascii', |
17 ' ascii', | 17 ' ascii', |
18 '֑sc.ii', | 18 '֑sc.ii', |
19 '⃣scii', | 19 '⃣scii', |
20 'िascii', | 20 'िascii', |
21 'ʳascii', | 21 'ʳascii', |
22 // Invalid other char | 22 // Invalid other char |
23 'asc i', | 23 'asc i', |
24 'asc i', | 24 'asc i', |
25 'asciiⅦ' | 25 'asciiⅦ' |
26 ]; | 26 ]; |
27 | 27 |
28 for (var i in nameList) | 28 for (var i in nameList) |
29 shouldThrow("document.createElement('" + nameList[i] +"')", "'InvalidCharact
erError: The string contains invalid characters.'"); | 29 shouldThrow("document.createElement('" + nameList[i] +"')", "'InvalidCharact
erError: The string contains invalid characters.'"); |
30 </script> | 30 </script> |
31 </body> | 31 </body> |
32 </html> | 32 </html> |
OLD | NEW |