Add reftest for setAttribute restyling

ref-test for #346