Some of the tests at http://philip.html5.org/tests/canvas/suite/tests/index.2d.pattern.html fail on the first load as they expect window.onload to fire after all their subresources -- the effect is especially noticeable in the 2nd test 2d.pattern.basic.image -- on the first load it fails, but if you reload the page it passes.
The problem is that the code gets called in from window.onload and draws an image to the canvas, but the image has not loaded despite window.onload having fired.