 doc.createElement('template');

    template.innerHTML = '<div id="div1">Some text</div><head><title>test</title></head>';

    doc.body.appendChild(template);

    assert_equals(template.content.childNodes.length, 2,
            'Wrong number of template content children');
    assert_not_equals(template.content.querySelector('#div1'), null,
            'Template should contain valid element');
    assert_equals(template.content.lastChild.tagName, 'TITLE',
            'Template should contain children of 