Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dynamic / insertAdjacentHTML-allowed-parents.html
blob15bd58cfe880d3198ab4215d3398b56c582d94fd
1 <head>
2 <script>
3 if (window.testRunner)
4 testRunner.dumpAsText();
6 log = function(msg)
8 document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
11 var testZone;
12 test = function(tag)
14 var el = document.createElement(tag);
15 testZone.appendChild(el);
17 try {
18 el.insertAdjacentHTML("beforeBegin", "HTML");
19 log("PASS: insertAdjacentHTML did not throw an exception when using the " + tag + " tag.");
20 } catch(e) {
21 log("FAIL: insertAdjacentHTML threw an exception when using the " + tag + " tag: " + e);
24 testZone.innerHTML = "";
27 onload = function()
29 testZone = document.getElementById('testZone');
31 var tags = ["a",
32 "abbr",
33 "acronym",
34 "address",
35 "applet",
36 "area",
37 "audio",
38 "b",
39 "base",
40 "basefont",
41 "bdo",
42 "big",
43 "blockquote",
44 "body",
45 "br",
46 "button",
47 "canvas",
48 "caption",
49 "center",
50 "cite",
51 "code",
52 "col",
53 "colgroup",
54 "dd",
55 "del",
56 "dfn",
57 "dir",
58 "div",
59 "dl",
60 "dt",
61 "em",
62 "embed",
63 "fieldset",
64 "font",
65 "form",
66 "frame",
67 "frameset",
68 "h1",
69 "h2",
70 "h3",
71 "h4",
72 "h5",
73 "h6",
74 "head",
75 "hr",
76 "html",
77 "i",
78 "iframe",
79 "image",
80 "img",
81 "input",
82 "ins",
83 "isindex",
84 "kbd",
85 "keygen",
86 "label",
87 "layer",
88 "legend",
89 "li",
90 "link",
91 "listing",
92 "map",
93 "marquee",
94 "menu",
95 "meta",
96 "nobr",
97 "noembed",
98 "noframes",
99 "nolayer",
100 "noscript",
101 "object",
102 "ol",
103 "optgroup",
104 "option",
105 "p",
106 "param",
107 "plaintext",
108 "pre",
109 "q",
110 "s",
111 "samp",
112 "script",
113 "select",
114 "small",
115 "source",
116 "span",
117 "strike",
118 "strong",
119 "style",
120 "sub",
121 "sup",
122 "table",
123 "tbody",
124 "td",
125 "textarea",
126 "tfoot",
127 "th",
128 "thead",
129 "title",
130 "tr",
131 "tt",
132 "u",
133 "ul",
134 "var",
135 "video",
136 "wbr",
137 "xmp"];
139 for (var i = 0; i < tags.length; ++i) {
140 test(tags[i]);
143 test("unknown");
145 </script>
146 </head>
147 <body>
148 <pre id="console"></pre>
149 <div id="testZone"></div>
150 </body>