t src="/html/resources/common.js"></script>
</head>
<body>
<div id="log"></div>
<script type="text/javascript">

function doTest(doc, templateInnerHTML, id, tagName, bodiesNum = null, footerIsNull,
        headerIsNull) {

    doc.body.innerHTML = '' +
        '<table id="tbl">' +
        '<template id="tmpl1">' +
        // When parser meets <caption>, <colgroup>, <tbody>, <tfoot>, <thead>, <col>
        // stack must be cleared back to table context.
        //But <template> tag should abort this process
