Small test refactoring.
Ensure the toolbar only outputs valid XML.

This allows using it in websites served with the application/xml+xhtml
mime type. Fix #221.