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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/svg/custom/svg-getelementid.xhtml
diff --git a/LayoutTests/svg/custom/svg-getelementid.xhtml b/LayoutTests/svg/custom/svg-getelementid.xhtml
index f7e7c69ff6e524862052315369573688ba7f50dd..ded5cd2b3d2998a0c442eff13420fc43cb4729d7 100644
--- a/LayoutTests/svg/custom/svg-getelementid.xhtml
+++ b/LayoutTests/svg/custom/svg-getelementid.xhtml
@@ -79,6 +79,13 @@
var nonsvg = root.getElementById("nonsvg");
var foreign = root.getElementById("foreign");
shouldBeTrue("foreign.firstChild.nextSibling == nonsvg");
+
+ // Test that SVG element can find child elements when svg is not part of document yet
+ var orphanSvg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
+ var childSvg = document.createElementNS('http://www.w3.org/2000/svg', 'g');
+ orphanSvg.appendChild(childSvg)
+ childSvg.id = 'fooSvg2'
+ shouldBeTrue("childSvg == orphanSvg.getElementById('fooSvg2')");
]]></script>
</body>
« 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