More refactoring of canvas test.