Better testing of DOM methods