WebGL tests that use video can loop indefinitely

RESOLVED FIXED in mozilla19

Status

()

Core
Canvas: WebGL
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: padenot, Assigned: padenot)

Tracking

unspecified
mozilla19
Other
Other
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: webgl-conformance)

Attachments

(1 attachment, 2 obsolete attachments)

(Assignee)

Description

6 years ago
In the webgl conformance tests that use video elements (example: [1]), the tests are ran on "playing", and the video has a loop attribute. In that case, "playing" is fired every time we loop. Also, when the video is paused because it is buffering (which happens a lot even in local on try), it also fires a "playing" event.

That means the tests can be run multiple time (with multiple value being an high enough number to cause a timeout in the tests harness), and run an infinite number of time when ran outside the harness (making debugging rather painful).

An easy fix would be to set the |video.src| to null when we passed the tests, to ensure that "playing" will not fire.

This has been triggered by upcoming changes to the media element, and causes intermittent failures.

[1]: http://mxr.mozilla.org/mozilla-central/source/content/canvas/test/webgl/conformance/textures/tex-image-and-sub-image-2d-with-video.html?force=1
Thanks a lot! We should fix the tests and upstream the fix. Are you writing the patch for our copy of the tests? I have no experience whatsoever coding for the video element.
Whiteboard: webgl-conformance
(Assignee)

Comment 2

6 years ago
I have a patch sitting somewhere. I'll make sure it works properly (and fixes all the occurrences of this pattern) and attach it here.
(Assignee)

Comment 3

6 years ago
Created attachment 656293 [details] [diff] [review]
WebGL tests that use video can loop indefinitely. r=

This patch fixes the two occurences I found.

It's green on try: https://tbpl.mozilla.org/?tree=Try&rev=5d9493c46563.
Attachment #656293 - Flags: review?(bjacob)
Comment on attachment 656293 [details] [diff] [review]
WebGL tests that use video can loop indefinitely. r=

Review of attachment 656293 [details] [diff] [review]:
-----------------------------------------------------------------

Wouldn't it make more sense to remove the event listener?
Attachment #656293 - Flags: review?(bjacob)
Btw, sorry for being so nitpicky. The reason why I am is we're going to try to upstream it.
(Assignee)

Comment 6

6 years ago
Created attachment 657470 [details] [diff] [review]
WebGL tests that use video can loop indefinitely. r=

This seems indeed cleaner.
Attachment #657470 - Flags: review?(bjacob)
(Assignee)

Updated

6 years ago
Attachment #656293 - Attachment is obsolete: true
(Assignee)

Comment 7

6 years ago
Created attachment 657471 [details] [diff] [review]
WebGL tests that use video can loop indefinitely. r=

Even better with a semicolon at the end.
Attachment #657471 - Flags: review?(bjacob)
(Assignee)

Updated

6 years ago
Attachment #657470 - Attachment is obsolete: true
Attachment #657470 - Flags: review?(bjacob)
Attachment #657471 - Flags: review?(bjacob) → review+
Whiteboard: webgl-conformance → webgl-conformance webgl-test-needed
(Assignee)

Updated

6 years ago
Assignee: nobody → paul
https://hg.mozilla.org/mozilla-central/rev/b70f1224a9e8
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Merged upstream (a slightly different patch as it had changed):
https://github.com/KhronosGroup/WebGL/pull/98
Whiteboard: webgl-conformance webgl-test-needed → webgl-conformance
You need to log in before you can comment on or make changes to this bug.