HTMLElement::nodeName should not upper case non-ASCII characters
[WebKit.git] / LayoutTests / fast / dom / Element / tagName-must-be-ASCII-uppercase-in-HTML-document.html
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <script src="../../../resources/js-test-pre.js"></script>
5 <script>
6
7 description('Tests that tagName and nodeName uppercases ASCII and only ASCII letters in a HTML document.');
8
9 evalAndLog('htmlDocument = document');
10 shouldBeEqualToString('htmlDocument.createElement("\u0130nput").tagName', '\u0130NPUT');
11 shouldBeEqualToString('htmlDocument.createElement("\u0131nput").tagName', '\u0131NPUT');
12 shouldBeEqualToString('htmlDocument.createElement("x\u0130nput").nodeName', 'X\u0130NPUT');
13 shouldBeEqualToString('htmlDocument.createElement("x\u0131nput").nodeName', 'X\u0131NPUT');
14
15 shouldBeEqualToString('htmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x:\u0130nput").tagName', 'X:\u0130NPUT');
16 shouldBeEqualToString('htmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x\u0130:\u0131nput").tagName', 'X\u0130:\u0131NPUT');
17 shouldBeEqualToString('htmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x:\u0130nput").nodeName', 'X:\u0130NPUT');
18 shouldBeEqualToString('htmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x\u0131:\u0130nput").nodeName', 'X\u0131:\u0130NPUT');
19
20 debug('');
21 evalAndLog('xmlDocument = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html")');
22 shouldBeEqualToString('xmlDocument.createElement("\u0130nput").tagName', '\u0130nput');
23 shouldBeEqualToString('xmlDocument.createElement("\u0131nput").tagName', '\u0131nput');
24 shouldBeEqualToString('xmlDocument.createElement("x\u0130nput").nodeName', 'x\u0130nput');
25 shouldBeEqualToString('xmlDocument.createElement("x\u0131nput").nodeName', 'x\u0131nput');
26
27 shouldBeEqualToString('xmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x:\u0130nput").tagName', 'x:\u0130nput');
28 shouldBeEqualToString('xmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x\u0130:\u0131nput").tagName', 'x\u0130:\u0131nput');
29 shouldBeEqualToString('xmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x:\u0130nput").nodeName', 'x:\u0130nput');
30 shouldBeEqualToString('xmlDocument.createElementNS("http://www.w3.org/1999/xhtml", "x\u0131:\u0130nput").nodeName', 'x\u0131:\u0130nput');
31
32 </script>
33 <script src="../../../resources/js-test-post.js"></script>
34 </body>
35 </html>