<head>
<script>
    if (window.layoutTestController)
        layoutTestController.dumpAsText();

    log = function(msg)
    {
        document.getElementById('console').appendChild(document.createTextNode(msg + "\n"));
    }

    var testZone;
    test = function(tag)
    {
        var el = document.createElement(tag);
        testZone.appendChild(el);

        try {
            el.insertAdjacentHTML("beforeBegin", "HTML");
            log("PASS: insertAdjacentHTML did not throw an exception when using the " + tag + " tag.");
        } catch(e) {
            log("FAIL: insertAdjacentHTML threw an exception when using the " + tag + " tag: " + e);
        }

        testZone.innerHTML = "";
    }

    onload = function()
    {
        testZone = document.getElementById('testZone');

        var tags = ["a",
                    "abbr",
                    "acronym",
                    "address",
                    "applet",
                    "area",
                    "audio",
                    "b",
                    "base",
                    "basefont",
                    "bdo",
                    "big",
                    "blockquote",
                    "body",
                    "br",
                    "button",
                    "canvas",
                    "caption",
                    "center",
                    "cite",
                    "code",
                    "col",
                    "colgroup",
                    "dd",
                    "del",
                    "dfn",
                    "dir",
                    "div",
                    "dl",
                    "dt",
                    "em",
                    "embed",
                    "fieldset",
                    "font",
                    "form",
                    "frame",
                    "frameset",
                    "h1",
                    "h2",
                    "h3",
                    "h4",
                    "h5",
                    "h6",
                    "head",
                    "hr",
                    "html",
                    "i",
                    "iframe",
                    "image",
                    "img",
                    "input",
                    "ins",
                    "isindex",
                    "kbd",
                    "keygen",
                    "label",
                    "layer",
                    "legend",
                    "li",
                    "link",
                    "listing",
                    "map",
                    "marquee",
                    "menu",
                    "meta",
                    "nobr",
                    "noembed",
                    "noframes",
                    "nolayer",
                    "noscript",
                    "object",
                    "ol",
                    "optgroup",
                    "option",
                    "p",
                    "param",
                    "plaintext",
                    "pre",
                    "q",
                    "s",
                    "samp",
                    "script",
                    "select",
                    "small",
                    "source",
                    "span",
                    "strike",
                    "strong",
                    "style",
                    "sub",
                    "sup",
                    "table",
                    "tbody",
                    "td",
                    "textarea",
                    "tfoot",
                    "th",
                    "thead",
                    "title",
                    "tr",
                    "tt",
                    "u",
                    "ul",
                    "var",
                    "video",
                    "wbr",
                    "xmp"];

        for (var i = 0; i < tags.length; ++i) {
            test(tags[i]);
        }

        test("unknown");
    }
</script>
</head>
<body>
    <pre id="console"></pre>
    <div id="testZone"></div>
</body>
