PageRenderTime 100ms CodeModel.GetById 7ms RepoModel.GetById 0ms app.codeStats 0ms

/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/syntax/parsing/Document.getElementsByTagName-foreign-01.html

https://gitlab.com/jonnialva90/iridium-browser
HTML | 143 lines | 143 code | 0 blank | 0 comment | 0 complexity | 0d3b764aa684ed0d08dc53d1fd3a72a5 MD5 | raw file
  1. <!DOCTYPE html>
  2. <title>document.getElementsByTagName and foreign parser-inserted
  3. elements</title>
  4. <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
  5. <link rel="help" href="https://dom.spec.whatwg.org/#dom-document-getelementsbytagname">
  6. <link rel="help" href="https://html.spec.whatwg.org/multipage/#parsing">
  7. <script src="../../../../../resources/testharness.js"></script>
  8. <script src="../../../../../resources/testharnessreport.js"></script>
  9. <div id="log"></div>
  10. <div id="test">
  11. <svg>
  12. <altglyph/>
  13. <altglyphdef/>
  14. <altglyphitem/>
  15. <animatecolor/>
  16. <animatemotion/>
  17. <animatetransform/>
  18. <clippath/>
  19. <feblend/>
  20. <fecolormatrix/>
  21. <fecomponenttransfer/>
  22. <fecomposite/>
  23. <feconvolvematrix/>
  24. <fediffuselighting/>
  25. <fedisplacementmap/>
  26. <fedistantlight/>
  27. <feflood/>
  28. <fefunca/>
  29. <fefuncb/>
  30. <fefuncg/>
  31. <fefuncr/>
  32. <fegaussianblur/>
  33. <feimage/>
  34. <femerge/>
  35. <femergenode/>
  36. <femorphology/>
  37. <feoffset/>
  38. <fepointlight/>
  39. <fespecularlighting/>
  40. <fespotlight/>
  41. <fetile/>
  42. <feturbulence/>
  43. <foreignobject/>
  44. <glyphref/>
  45. <lineargradient/>
  46. <radialgradient/>
  47. <textpath/>
  48. <ALTGLYPH/>
  49. <ALTGLYPHDEF/>
  50. <ALTGLYPHITEM/>
  51. <ANIMATECOLOR/>
  52. <ANIMATEMOTION/>
  53. <ANIMATETRANSFORM/>
  54. <CLIPPATH/>
  55. <FEBLEND/>
  56. <FECOLORMATRIX/>
  57. <FECOMPONENTTRANSFER/>
  58. <FECOMPOSITE/>
  59. <FECONVOLVEMATRIX/>
  60. <FEDIFFUSELIGHTING/>
  61. <FEDISPLACEMENTMAP/>
  62. <FEDISTANTLIGHT/>
  63. <FEFLOOD/>
  64. <FEFUNCA/>
  65. <FEFUNCB/>
  66. <FEFUNCG/>
  67. <FEFUNCR/>
  68. <FEGAUSSIANBLUR/>
  69. <FEIMAGE/>
  70. <FEMERGE/>
  71. <FEMERGENODE/>
  72. <FEMORPHOLOGY/>
  73. <FEOFFSET/>
  74. <FEPOINTLIGHT/>
  75. <FESPECULARLIGHTING/>
  76. <FESPOTLIGHT/>
  77. <FETILE/>
  78. <FETURBULENCE/>
  79. <FOREIGNOBJECT/>
  80. <GLYPHREF/>
  81. <LINEARGRADIENT/>
  82. <RADIALGRADIENT/>
  83. <TEXTPATH/>
  84. </svg>
  85. <script>
  86. var elements = [
  87. "altGlyph",
  88. "altGlyphDef",
  89. "altGlyphItem",
  90. "animateColor",
  91. "animateMotion",
  92. "animateTransform",
  93. "clipPath",
  94. "feBlend",
  95. "feColorMatrix",
  96. "feComponentTransfer",
  97. "feComposite",
  98. "feConvolveMatrix",
  99. "feDiffuseLighting",
  100. "feDisplacementMap",
  101. "feDistantLight",
  102. "feFlood",
  103. "feFuncA",
  104. "feFuncB",
  105. "feFuncG",
  106. "feFuncR",
  107. "feGaussianBlur",
  108. "feImage",
  109. "feMerge",
  110. "feMergeNode",
  111. "feMorphology",
  112. "feOffset",
  113. "fePointLight",
  114. "feSpecularLighting",
  115. "feSpotLight",
  116. "feTile",
  117. "feTurbulence",
  118. "foreignObject",
  119. "glyphRef",
  120. "linearGradient",
  121. "radialGradient",
  122. "textPath"];
  123. </script>
  124. </div>
  125. <script>
  126. var SVG = "http://www.w3.org/2000/svg";
  127. function t(el) {
  128. assert_equals(document.getElementsByTagName(el).length, 2);
  129. assert_equals(document.getElementsByTagName(el.toUpperCase()).length, 0);
  130. assert_equals(document.getElementsByTagName(el.toLowerCase()).length, 0);
  131. assert_equals(document.getElementsByTagNameNS(SVG, el).length, 2);
  132. assert_equals(document.getElementsByTagNameNS(SVG, el.toUpperCase()).length, 0);
  133. assert_equals(document.getElementsByTagNameNS(SVG, el.toLowerCase()).length, 0);
  134. }
  135. test(function() {
  136. var tests = [];
  137. assert_equals(document.getElementsByTagName('svg').length, 1);
  138. for (var i = 0, il = elements.length; i < il; ++i) {
  139. tests.push(["Testing " + elements[i], elements[i]]);
  140. }
  141. generate_tests(t, tests);
  142. });
  143. </script>