The test had a baked-in assumption that waiting for a single
onNewPicture after the load guarantees that the picture returned
from capturePicture will contain the contents of the newly loaded
page. This is in general not true (we may receive onNewPicture
callback for an intermediate 'about:blank' page load, for example)
and caused the test to occasionally fail.
The solution is to rewrite the test to wait for the correct picture
1 file changed