Add a few more cases to test for integers, in particular -0.
Fix the special case for canvas.width/height to keep the arrays in sync.