    var doc = newHTMLDocument();

    // Wrong end tag. Correct end tag must be added implicitly, wrong one ignored
    doc.head.innerHTML = '<template id="tpl"><div id="dv">Div content</span></template>';

    var template = doc.querySelector('#tpl');

    assert_not_equals(template, null, 'Template element must be parsed');

    assert_equals(template.content.childNodes.length, 1,
            'Wrong number of template\'s children');

    assert_equals(doc.querySelector('#dv'), null, 'DIV element should no