OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <title>HTML Test: element.outerHTML to verify HTML fragment serialization al
gorithm</title> |
| 5 <link rel="author" title="Intel" href="http://www.intel.com/"> |
| 6 <link rel="help" href="https://html.spec.whatwg.org/multipage/#html-fragment
-serialization-algorithm"> |
| 7 <link rel="help" href="https://dvcs.w3.org/hg/innerhtml/raw-file/tip/index.h
tml#widl-Element-outerHTML"> |
| 8 <script src="../../../../../resources/testharness.js"></script> |
| 9 <script src="../../../../../resources/testharnessreport.js"></script> |
| 10 </head> |
| 11 <body> |
| 12 <div id="log"></div> |
| 13 <script> |
| 14 var element = [ |
| 15 "a", |
| 16 "abbr", |
| 17 "address", |
| 18 "article", |
| 19 "aside", |
| 20 "audio", |
| 21 "b", |
| 22 "bdi", |
| 23 "bdo", |
| 24 "blockquote", |
| 25 "body", |
| 26 "button", |
| 27 "canvas", |
| 28 "caption", |
| 29 "cite", |
| 30 "code", |
| 31 "colgroup", |
| 32 "command", |
| 33 "datalist", |
| 34 "dd", |
| 35 "del", |
| 36 "details", |
| 37 "dfn", |
| 38 "dialog", |
| 39 "div", |
| 40 "dl", |
| 41 "dt", |
| 42 "em", |
| 43 "fieldset", |
| 44 "figcaption", |
| 45 "figure", |
| 46 "footer", |
| 47 "form", |
| 48 "h1", |
| 49 "h2", |
| 50 "h3", |
| 51 "h4", |
| 52 "h5", |
| 53 "h6", |
| 54 "head", |
| 55 "header", |
| 56 "hgroup", |
| 57 "html", |
| 58 "i", |
| 59 "iframe", |
| 60 "ins", |
| 61 "kbd", |
| 62 "label", |
| 63 "legend", |
| 64 "li", |
| 65 "map", |
| 66 "mark", |
| 67 "menu", |
| 68 "meter", |
| 69 "nav", |
| 70 "noscript", |
| 71 "object", |
| 72 "ol", |
| 73 "optgroup", |
| 74 "option", |
| 75 "output", |
| 76 "p", |
| 77 "pre", |
| 78 "progress", |
| 79 "q", |
| 80 "rp", |
| 81 "rt", |
| 82 "ruby", |
| 83 "s", |
| 84 "samp", |
| 85 "script", |
| 86 "section", |
| 87 "select", |
| 88 "small", |
| 89 "span", |
| 90 "strong", |
| 91 "style", |
| 92 "sub", |
| 93 "summary", |
| 94 "sup", |
| 95 "table", |
| 96 "tbody", |
| 97 "td", |
| 98 "textarea", |
| 99 "tfoot", |
| 100 "th", |
| 101 "thead", |
| 102 "time", |
| 103 "title", |
| 104 "tr", |
| 105 "u", |
| 106 "ul", |
| 107 "var", |
| 108 "video", |
| 109 "data", |
| 110 //"acronym", |
| 111 //"applet", |
| 112 //"basefont", |
| 113 //"bgsound", |
| 114 //"big", |
| 115 //"blink", |
| 116 //"center", |
| 117 //"dir", |
| 118 //"font", |
| 119 //"frame", |
| 120 //"frameset", |
| 121 //"isindex", |
| 122 //"listing", |
| 123 //"marquee", |
| 124 //"multicol", |
| 125 //"nextid", |
| 126 //"nobr", |
| 127 //"noembed", |
| 128 //"noframes", |
| 129 //"plaintext", |
| 130 //"rb", |
| 131 //"spacer", |
| 132 //"strike", |
| 133 //"tt", |
| 134 //"xmp", |
| 135 ]; |
| 136 |
| 137 var noEndTag = [ |
| 138 "area", |
| 139 "base", |
| 140 "br", |
| 141 "col", |
| 142 "embed", |
| 143 "hr", |
| 144 "img", |
| 145 "input", |
| 146 "keygen", |
| 147 "link", |
| 148 "meta", |
| 149 "param", |
| 150 "source", |
| 151 "track", |
| 152 "wbr", |
| 153 ]; |
| 154 |
| 155 test(function() { |
| 156 element.forEach(function(ele) { |
| 157 test(function() { |
| 158 var e = document.createElement(ele); |
| 159 assert_equals(e.outerHTML, "<" + ele + "></" + ele + ">", ele + " no
de created." ); |
| 160 }, "Node for " + ele); |
| 161 }); |
| 162 noEndTag.forEach(function(ele) { |
| 163 test(function() { |
| 164 var e = document.createElement(ele); |
| 165 assert_equals(e.outerHTML, "<" + ele + ">", ele + " node created." )
; |
| 166 }, "Node for " + ele); |
| 167 }); |
| 168 }, document.title); |
| 169 </script> |
| 170 </body> |
| 171 </html> |
OLD | NEW |