|
1 <html xmlns="http://www.w3.org/1999/xhtml"> |
|
2 <!-- |
|
3 https://bugzilla.mozilla.org/show_bug.cgi?id=499655 |
|
4 --> |
|
5 <head> |
|
6 <title>Test for Bug 499655</title> |
|
7 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
9 </head> |
|
10 <body> |
|
11 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=499655">Mozilla Bug 499655</a> |
|
12 <p id="display"></p> |
|
13 <div id="content" style="display: none"> |
|
14 |
|
15 </div> |
|
16 <pre id="test"> |
|
17 <script type="application/javascript"> |
|
18 <![CDATA[ |
|
19 |
|
20 test1 = document.createElementNS("http://www.w3.org/1999/xhtml","test"); |
|
21 test2 = document.createElementNS("http://www.w3.org/1999/xhtml","TEst"); |
|
22 test3 = document.createElementNS("test","test"); |
|
23 test4 = document.createElementNS("test","TEst"); |
|
24 |
|
25 content = document.getElementById("content"); |
|
26 |
|
27 content.appendChild(test1); |
|
28 content.appendChild(test2); |
|
29 content.appendChild(test3); |
|
30 content.appendChild(test4); |
|
31 |
|
32 |
|
33 list = document.querySelectorAll('test'); |
|
34 is(list.length, 2, "Number of elements found"); |
|
35 is(list[0], test1, "First element didn't match"); |
|
36 is(list[1] , test3, "Third element didn't match"); |
|
37 |
|
38 list = document.querySelectorAll('TEst'); |
|
39 is(list.length, 2, "Number of elements found"); |
|
40 is(list[0], test2, "Second element didn't match"); |
|
41 is(list[1], test4, "Fourth element didn't match"); |
|
42 |
|
43 |
|
44 ]]> |
|
45 </script> |
|
46 </pre> |
|
47 </body> |
|
48 </html> |