PageRenderTime 1178ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/third_party/WebKit/LayoutTests/imported/web-platform-tests/html/dom/documents/dom-tree-accessors/document.getElementsByName/document.getElementsByName-newelements.html

https://gitlab.com/jonnialva90/iridium-browser
HTML | 122 lines | 122 code | 0 blank | 0 comment | 0 complexity | 8a22597916502f43cb8ee30b4c1689bb MD5 | raw file
  1. <!DOCTYPE html>
  2. <title>getElementsByName and newly introduced HTML elements</title>
  3. <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
  4. <link rel="help" href="https://html.spec.whatwg.org/multipage/#dom-document-getelementsbyname">
  5. <link rel="stylesheet" href="../../../../../../../resources/testharness.css">
  6. <script src="../../../../../../../resources/testharness.js"></script>
  7. <script src="../../../../../../../resources/testharnessreport.js"></script>
  8. <div id="log"></div>
  9. <div id="test">
  10. <section name="section"></section>
  11. <article name="article"></article>
  12. <aside name="aside"></aside>
  13. <hgroup name="hgroup"></hgroup>
  14. <header name="header"></header>
  15. <footer name="footer"></footer>
  16. <nav name="nav"></nav>
  17. <dialog name="dialog"></dialog>
  18. <figure name="figure"></figure>
  19. <audio name="audio"></audio>
  20. <video name="video"></video>
  21. <embed name="embed"></embed>
  22. <mark name="mark"></mark>
  23. <meter name="meter"></meter>
  24. <progress name="progress"></progress>
  25. <time name="time"></time>
  26. <canvas name="canvas"></canvas>
  27. <command name="command"></command>
  28. <menu name="menu"></menu>
  29. <details name="details"></details>
  30. <datalist name="datalist"></datalist>
  31. <keygen name="keygen"></keygen>
  32. <output name="output"></output>
  33. <ruby name="ruby"></ruby>
  34. <rt name="rt"></rt>
  35. <rp name="rp"></rp>
  36. <source name="source">
  37. </div>
  38. <script>
  39. test(function() {
  40. assert_equals(document.getElementsByName("section").length, 1);
  41. assert_equals(document.getElementsByName("section")[0],
  42. document.getElementsByTagName("section")[0]);
  43. assert_equals(document.getElementsByName("article").length, 1);
  44. assert_equals(document.getElementsByName("article")[0],
  45. document.getElementsByTagName("article")[0]);
  46. assert_equals(document.getElementsByName("aside").length, 1);
  47. assert_equals(document.getElementsByName("aside")[0],
  48. document.getElementsByTagName("aside")[0]);
  49. assert_equals(document.getElementsByName("hgroup").length, 1);
  50. assert_equals(document.getElementsByName("hgroup")[0],
  51. document.getElementsByTagName("hgroup")[0]);
  52. assert_equals(document.getElementsByName("header").length, 1);
  53. assert_equals(document.getElementsByName("header")[0],
  54. document.getElementsByTagName("header")[0]);
  55. assert_equals(document.getElementsByName("footer").length, 1);
  56. assert_equals(document.getElementsByName("footer")[0],
  57. document.getElementsByTagName("footer")[0]);
  58. assert_equals(document.getElementsByName("nav").length, 1);
  59. assert_equals(document.getElementsByName("nav")[0],
  60. document.getElementsByTagName("nav")[0]);
  61. assert_equals(document.getElementsByName("dialog").length, 1);
  62. assert_equals(document.getElementsByName("dialog")[0],
  63. document.getElementsByTagName("dialog")[0]);
  64. assert_equals(document.getElementsByName("figure").length, 1);
  65. assert_equals(document.getElementsByName("figure")[0],
  66. document.getElementsByTagName("figure")[0]);
  67. assert_equals(document.getElementsByName("audio").length, 1);
  68. assert_equals(document.getElementsByName("audio")[0],
  69. document.getElementsByTagName("audio")[0]);
  70. assert_equals(document.getElementsByName("video").length, 1);
  71. assert_equals(document.getElementsByName("video")[0],
  72. document.getElementsByTagName("video")[0]);
  73. assert_equals(document.getElementsByName("embed").length, 1);
  74. assert_equals(document.getElementsByName("embed")[0],
  75. document.getElementsByTagName("embed")[0]);
  76. assert_equals(document.getElementsByName("mark").length, 1);
  77. assert_equals(document.getElementsByName("mark")[0],
  78. document.getElementsByTagName("mark")[0]);
  79. assert_equals(document.getElementsByName("meter").length, 1);
  80. assert_equals(document.getElementsByName("meter")[0],
  81. document.getElementsByTagName("meter")[0]);
  82. assert_equals(document.getElementsByName("progress").length, 1);
  83. assert_equals(document.getElementsByName("progress")[0],
  84. document.getElementsByTagName("progress")[0]);
  85. assert_equals(document.getElementsByName("time").length, 1);
  86. assert_equals(document.getElementsByName("time")[0],
  87. document.getElementsByTagName("time")[0]);
  88. assert_equals(document.getElementsByName("canvas").length, 1);
  89. assert_equals(document.getElementsByName("canvas")[0],
  90. document.getElementsByTagName("canvas")[0]);
  91. assert_equals(document.getElementsByName("command").length, 1);
  92. assert_equals(document.getElementsByName("command")[0],
  93. document.getElementsByTagName("command")[0]);
  94. assert_equals(document.getElementsByName("menu").length, 1);
  95. assert_equals(document.getElementsByName("menu")[0],
  96. document.getElementsByTagName("menu")[0]);
  97. assert_equals(document.getElementsByName("details").length, 1);
  98. assert_equals(document.getElementsByName("details")[0],
  99. document.getElementsByTagName("details")[0]);
  100. assert_equals(document.getElementsByName("datalist").length, 1);
  101. assert_equals(document.getElementsByName("datalist")[0],
  102. document.getElementsByTagName("datalist")[0]);
  103. assert_equals(document.getElementsByName("keygen").length, 1);
  104. assert_equals(document.getElementsByName("keygen")[0],
  105. document.getElementsByTagName("keygen")[0]);
  106. assert_equals(document.getElementsByName("output").length, 1);
  107. assert_equals(document.getElementsByName("output")[0],
  108. document.getElementsByTagName("output")[0]);
  109. assert_equals(document.getElementsByName("ruby").length, 1);
  110. assert_equals(document.getElementsByName("ruby")[0],
  111. document.getElementsByTagName("ruby")[0]);
  112. assert_equals(document.getElementsByName("rt").length, 1);
  113. assert_equals(document.getElementsByName("rt")[0],
  114. document.getElementsByTagName("rt")[0]);
  115. assert_equals(document.getElementsByName("rp").length, 1);
  116. assert_equals(document.getElementsByName("rp")[0],
  117. document.getElementsByTagName("rp")[0]);
  118. assert_equals(document.getElementsByName("source").length, 1);
  119. assert_equals(document.getElementsByName("source")[0],
  120. document.getElementsByTagName("source")[0]);
  121. });
  122. </script>