add test of add_html_before_legend filter