KhronosGroup/WebGL — pull request #285 by kenrussell (2013-05-29 23:12:21+00:00)
Title: Updated video tests to be more correct.

The video-related WebGL conformance tests
(tex-image-and-sub-image-2d-with-video.html with variants, and
texture-npot-video.html) currently start the test upon receiving the
"playing" event. After receiving feedback from the Chrome on Android
team, and studying the HTMLVideoElement spec, it seems that this is
incorrect.
http://www.w3.org/html/wg/drafts/html/master/embedded-content-0.html#mediaevents
says for the "playing" event: "Even if this event fires, the element
might still not be potentially playing".

Watching for a "timeupdate" event where the video's currentTime is
past the start time seems to be a more reliable heuristic.

There are bugs in Safari, including current WebKit nightlies, with
dynamically created video elements, and video elements with
style="display:none". This patch improves the reliability with
dynamically created video elements, but causes reliable failures with
display:none elements (used by texture-npot-video.html). This test was
already previously failing in Safari, so I believe it is warranted to
update all versions of these video tests in the same way to generally
improve their reliability, and assume that this bug will be fixed in
Safari at some point in the future.

Tested all versions of these tests with Chrome, Firefox and Safari on
Mac OS. Chrome and Firefox pass the tests completely. The current
WebKit nightly now passes the 1.0.2 and top of tree
tex-image-and-sub-image-with-video.html tests, where it was failing
them before.