De-flake WebViewTest.testCapturePicture

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

Bug: 12971701

Change-Id: Id891be760adfa9241f162ba3768a4f5baad2c326
1 file changed