diff options
Diffstat (limited to 'testing/web-platform/tests/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html')
-rw-r--r-- | testing/web-platform/tests/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html | 143 |
1 files changed, 143 insertions, 0 deletions
diff --git a/testing/web-platform/tests/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html b/testing/web-platform/tests/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html new file mode 100644 index 0000000000..2bdc83145e --- /dev/null +++ b/testing/web-platform/tests/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html @@ -0,0 +1,143 @@ +<!DOCTYPE html> +<title>document.getElementsByTagName and foreign parser-inserted +elements</title> +<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> +<link rel="help" href="https://dom.spec.whatwg.org/#dom-document-getelementsbytagname"> +<link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing"> +<script src="/resources/testharness.js"></script> +<script src="/resources/testharnessreport.js"></script> +<div id="log"></div> +<div id="test"> +<svg> +<altglyph/> + <altglyphdef/> + <altglyphitem/> + <animatecolor/> + <animatemotion/> + <animatetransform/> + <clippath/> + <feblend/> + <fecolormatrix/> + <fecomponenttransfer/> + <fecomposite/> + <feconvolvematrix/> + <fediffuselighting/> + <fedisplacementmap/> + <fedistantlight/> + <feflood/> + <fefunca/> + <fefuncb/> + <fefuncg/> + <fefuncr/> + <fegaussianblur/> + <feimage/> + <femerge/> + <femergenode/> + <femorphology/> + <feoffset/> + <fepointlight/> + <fespecularlighting/> + <fespotlight/> + <fetile/> + <feturbulence/> + <foreignobject/> + <glyphref/> + <lineargradient/> + <radialgradient/> + <textpath/> + <ALTGLYPH/> + <ALTGLYPHDEF/> + <ALTGLYPHITEM/> + <ANIMATECOLOR/> + <ANIMATEMOTION/> + <ANIMATETRANSFORM/> + <CLIPPATH/> + <FEBLEND/> + <FECOLORMATRIX/> + <FECOMPONENTTRANSFER/> + <FECOMPOSITE/> + <FECONVOLVEMATRIX/> + <FEDIFFUSELIGHTING/> + <FEDISPLACEMENTMAP/> + <FEDISTANTLIGHT/> + <FEFLOOD/> + <FEFUNCA/> + <FEFUNCB/> + <FEFUNCG/> + <FEFUNCR/> + <FEGAUSSIANBLUR/> + <FEIMAGE/> + <FEMERGE/> + <FEMERGENODE/> + <FEMORPHOLOGY/> + <FEOFFSET/> + <FEPOINTLIGHT/> + <FESPECULARLIGHTING/> + <FESPOTLIGHT/> + <FETILE/> + <FETURBULENCE/> + <FOREIGNOBJECT/> + <GLYPHREF/> + <LINEARGRADIENT/> + <RADIALGRADIENT/> + <TEXTPATH/> +</svg> +<script> +var elements = [ + "altGlyph", + "altGlyphDef", + "altGlyphItem", + "animateColor", + "animateMotion", + "animateTransform", + "clipPath", + "feBlend", + "feColorMatrix", + "feComponentTransfer", + "feComposite", + "feConvolveMatrix", + "feDiffuseLighting", + "feDisplacementMap", + "feDistantLight", + "feFlood", + "feFuncA", + "feFuncB", + "feFuncG", + "feFuncR", + "feGaussianBlur", + "feImage", + "feMerge", + "feMergeNode", + "feMorphology", + "feOffset", + "fePointLight", + "feSpecularLighting", + "feSpotLight", + "feTile", + "feTurbulence", + "foreignObject", + "glyphRef", + "linearGradient", + "radialGradient", + "textPath"]; +</script> +</div> +<script> +var SVG = "http://www.w3.org/2000/svg"; +function t(el) { + assert_equals(document.getElementsByTagName(el).length, 2); + assert_equals(document.getElementsByTagName(el.toUpperCase()).length, 0); + assert_equals(document.getElementsByTagName(el.toLowerCase()).length, 0); + assert_equals(document.getElementsByTagNameNS(SVG, el).length, 2); + assert_equals(document.getElementsByTagNameNS(SVG, el.toUpperCase()).length, 0); + assert_equals(document.getElementsByTagNameNS(SVG, el.toLowerCase()).length, 0); +} +test(function() { + var tests = []; + assert_equals(document.getElementsByTagName('svg').length, 1); + for (var i = 0, il = elements.length; i < il; ++i) { + tests.push(["Testing " + elements[i], elements[i]]); + } + generate_tests(t, tests); +}); +</script> |