Add some basic tests for video controls and video playback

RESOLVED FIXED in Firefox 36

Status

()

Firefox for Android
General
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: mfinkle, Assigned: mfinkle)

Tracking

(Depends on: 1 bug)

Trunk
Firefox 36
x86_64
Linux
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

Created attachment 8510314 [details] [diff] [review]
videocontrols-test v0.1

This test uses some ideas I found in a Desktop test:
http://mxr.mozilla.org/mozilla-central/source/toolkit/content/tests/widgets/test_videocontrols.html?force=1

We load a WEBM video (although OGG could be used too) into a <video> element. Check it's state, start playback, check it's state, pause it, check it's state and then grab a video frame. We do a rudimentary pixel test on the video frame to test that something actually was displayed in the video element.

See notes in the test about slight color shifts when grabbing the frame and the fuzzy testing.
Attachment #8510314 - Flags: review?(snorp)
Comment on attachment 8510314 [details] [diff] [review]
videocontrols-test v0.1

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

I like this. I'm surprised you need that much fuzzing on the image colors, though.
Attachment #8510314 - Flags: review?(snorp) → review+
We'll want to add MP4 eventually. Currently we have no devices that can run it. :(
Try run is green:
http://ftp.mozilla.org/pub/mozilla.org/mobile/try-builds/mfinkle@mozilla.com-00282dd98b37/try-android/try_panda_android_test-robocop-5-bm102-tests1-panda-build4213.txt.gz

(Search for testVideoControls)

The good news seems to be that the colors are exactly right on Test Automation. Maybe they only get fuzzy on the Samsung hardware I am using locally? I any case, I am still OK with fuzzing to get local runs to pass.
(In reply to Wes Kocher (:KWierso) from comment #5)
> Backed out in https://hg.mozilla.org/integration/fx-team/rev/2b42c89f7343
> for rc4 orange:
> 
> 
> https://treeherder.mozilla.org/ui/logviewer.html#?job_id=986521&repo=fx-team

Actually, this test is working:

16:37:43 INFO - testVideoControls.js | Color at (45, 10): {"r":0,"g":0,"b":0,"a":0} 
16:37:43 WARNING - TEST-UNEXPECTED-FAIL | testVideoControls | testVideoControls.js - Bar 1 is white - See following stack: 

The colors mean that the video frame is black, not white. The video is not rendering.
Flags: needinfo?(mark.finkle)
(In reply to Wes Kocher (:KWierso) from comment #5)
> Backed out in https://hg.mozilla.org/integration/fx-team/rev/2b42c89f7343
> for rc4 orange:
> 
> 
> https://treeherder.mozilla.org/ui/logviewer.html#?job_id=986521&repo=fx-team

Also, you didn't mention this was Android 2.3 only. The test is passing on Android 4 runs.
Re-landed with the tests disabled for Android 2.3
https://hg.mozilla.org/integration/fx-team/rev/52d7960cdb51

Some tests are better than no tests
Finkle for friends of the tree please.
(In reply to Aaron Train [:aaronmt] from comment #9)
> Finkle for friends of the tree please.

srsly
https://hg.mozilla.org/mozilla-central/rev/52d7960cdb51
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Assignee: nobody → mark.finkle
Target Milestone: --- → Firefox 36
Depends on: 1098532
You need to log in before you can comment on or make changes to this bug.