| OLD | NEW |
| 1 <html xmlns="http://www.w3.org/1999/xhtml"> | 1 <html xmlns="http://www.w3.org/1999/xhtml"> |
| 2 <head> | 2 <head> |
| 3 <script src="../../resources/js-test.js"/> | 3 <script src="../../resources/js-test.js"/> |
| 4 </head> | 4 </head> |
| 5 <body> | 5 <body> |
| 6 | 6 |
| 7 <div id="console"/> | 7 <div id="console"/> |
| 8 | 8 |
| 9 <div id="foo"/> | 9 <div id="foo"/> |
| 10 <div id="bar"/> | 10 <div id="bar"/> |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 var bar = root.getElementById("bar"); | 72 var bar = root.getElementById("bar"); |
| 73 shouldBeTrue("svgTree5.firstChild.nextSibling == bar"); | 73 shouldBeTrue("svgTree5.firstChild.nextSibling == bar"); |
| 74 | 74 |
| 75 // Test that search in svg subtree returns the first of the duplicates | 75 // Test that search in svg subtree returns the first of the duplicates |
| 76 shouldBeTrue("svgTree5.firstChild.nextSibling == svgTree5.getElementById('bar'
)"); | 76 shouldBeTrue("svgTree5.firstChild.nextSibling == svgTree5.getElementById('bar'
)"); |
| 77 | 77 |
| 78 // Test that non SVG content can be found in the svg subtree | 78 // Test that non SVG content can be found in the svg subtree |
| 79 var nonsvg = root.getElementById("nonsvg"); | 79 var nonsvg = root.getElementById("nonsvg"); |
| 80 var foreign = root.getElementById("foreign"); | 80 var foreign = root.getElementById("foreign"); |
| 81 shouldBeTrue("foreign.firstChild.nextSibling == nonsvg"); | 81 shouldBeTrue("foreign.firstChild.nextSibling == nonsvg"); |
| 82 |
| 83 // Test that SVG element can find child elements when svg is not part of docum
ent yet |
| 84 var orphanSvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg'); |
| 85 var childSvg = document.createElementNS('http://www.w3.org/2000/svg', 'g'); |
| 86 orphanSvg.appendChild(childSvg) |
| 87 childSvg.id = 'fooSvg2' |
| 88 shouldBeTrue("childSvg == orphanSvg.getElementById('fooSvg2')"); |
| 82 ]]></script> | 89 ]]></script> |
| 83 | 90 |
| 84 </body> | 91 </body> |
| 85 </html> | 92 </html> |
| OLD | NEW |