Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: LayoutTests/svg/custom/svg-getelementid.xhtml

Issue 196193003: Revert "Simplify SVGSVGElement::getElementById method" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/svg/custom/svg-getelementid-expected.txt » ('j') | Source/core/svg/SVGSVGElement.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698