add tests to samples
add more tests to samples

fix #293
close #301
fix #293 SVG sample broken on playground

Close #303