title>test</title></head></template>';

    doc.body.appendChild(template);

    assert_equals(template.content.childNodes.length, 1,
            'Template should contain nested template');
    assert_not_equals(template.content.querySelector('#t2'), null,
            'Template should contain nested element');

    var nestedTemplate = template.content.querySelector('#t2');

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