add @cabanier's test from #797 to the updated style
Merge pull request #970 from patrickkettner/new_canvas_apis

add @cabanier's test from #797 to the updated style