Tests and fix for class toggling

Use the `IMG_SRC` from #646.