Commit Graph

9 Commits

Author SHA1 Message Date
Chris Pearce
dd45189315 Bug 1443942 - Rewrite test_mediarecorder_principals. r=bryce
I changed this test earlier in this set of commits to use
midflight-redirect.sjs so that we get more reliable and predictable cross
origin redirects during the download. Unfortunately this test now times out on
Windows.

This test times out on Windows because midflight-redirect.sjs redirects at 1/4
through the resource, whereas this test expects to be able to play through to
1/5 through the resource, and on Windows that seems to be not reached during
playback. This is likely due to decode latency being higher on Windows.

On top of that, the test's first case can sometimes call MediaRecorder.start()
before the redirect has happened, and before the principal has changed, and so
start() doesn't throw a SecurityError as expected, and the test intermittently
fails.

Additionally, the test's code could be clearer if we used async/await.

So rewrite the test to use async/await, and take advantage of
midflight-redirect.sjs's redirect being more predictable than the old
dynamic_redirect.sjs. Basically, we can be careful to wait for either
"loadedmetadata" or "error" on the media element in order to be more confident
the redirect has or hasn't happened yet.

We still can't be 100% sure that the redirect won't have already happened by
the time our "loadedmetadata" handlers run. It's quite possible that the
download has reached 1/4 through the resource by the time the loadedmetadata
handler has run, so we need to handle the "error" and "loadedmetadata" events
racing.

MozReview-Commit-ID: 8plMjkXgjYt

--HG--
extra : rebase_source : 7305598f40c09219494f3e7150799d8875b7c30e
2018-04-05 13:35:14 +12:00
Dan Glastonbury
374105f522 Bug 1440555 - P2: Re-write tests that check for end after suspend. r=cpearce
These two tests had intermittent orange failures.  The logging shows
that the suspend happens but the `ended` event is never received.
Test re-written on the presumption that `ended` event is fired and
lost between checking `video.ended` and registering `ended` event in
`waitUnitEnded()`

MozReview-Commit-ID: GnAFADFOJje

--HG--
extra : rebase_source : 2e9d79e328bbc007ea4f9a7a9dce070619d9e32f
2018-02-26 18:38:42 +10:00
Kaku Kuo
d8f3ff3172 Bug 1358057 P2 - add a mochitest; r=jwwang
MozReview-Commit-ID: 4xa1GojEnX0

--HG--
extra : rebase_source : b7585b7cf0ffd0dafede1823f138ac53fa160885
2017-04-25 16:03:47 +08:00
Kaku Kuo
7dff9a64fb Bug 1345403 part 5 - Test video suspend canceling; r=jwwang
MozReview-Commit-ID: 99IDqpwuRIf

--HG--
extra : rebase_source : 468cb4563d6ed1b5fdb976ecfb68cf9b14b90389
extra : intermediate-source : 67db97814e8acbc68e4dc708d175a3c1013c9257
extra : source : 5f834fb13ceea6b13136c1fbd60d266eee95f3ad
2017-03-08 21:18:13 +08:00
Iris Hsiao
bdff9504ef Backed out 5 changesets (bug 1345403) for permanent failure in autophone Mdm tests
Backed out changeset f6415ae0ba89 (bug 1345403)
Backed out changeset ac12e246a808 (bug 1345403)
Backed out changeset a3e4ce12194f (bug 1345403)
Backed out changeset ba072186c917 (bug 1345403)
Backed out changeset 7a7d6e9b8329 (bug 1345403)
2017-03-13 15:28:14 +08:00
Kaku Kuo
1b7bf855b4 Bug 1345403 part 5 - Test video suspend canceling; r=jwwang
MozReview-Commit-ID: 99IDqpwuRIf

--HG--
extra : rebase_source : 1e1f945043ff4617a7c2db82e1f8dcf9e2277f6b
extra : source : 5f834fb13ceea6b13136c1fbd60d266eee95f3ad
2017-03-08 21:18:13 +08:00
JW Wang
a0d28a05e9 Bug 1339351 - fix typo. r=kaku
MozReview-Commit-ID: ApKvXMTqcDm

--HG--
extra : rebase_source : 6118ef0439cf2451f161bb491841e749e6eb1aab
extra : intermediate-source : de5851e330100048a2db2889b2f9cd3bf86ce3e0
extra : source : 0b0d7bf4fb45a64752b8703e0f6189cb93b1452b
2017-02-12 23:40:19 +08:00
Dan Glastonbury
7e511c5952 Bug 1294358 - P4: Shrink video size. r=jya
Make the test videos smaller so they are visible in the mochitest
iframe.

--HG--
extra : rebase_source : f3b04136115b9cbd80eee180851ae15f2affe6f6
2016-08-22 15:30:05 +10:00
Dan Glastonbury
888241afbc Bug 1284177 - P2: Video decode suspend mochitests. r=jwwang
Test:
- That video decode suspends when enabled and delay is reached.
- That video decode doesn't suspend when disabled.
- That video decode doesn't suspend when video finishes before suspend delay.

These tests need to run from content process to observe the suspend
notifications via nsIObserverService, but access to gBrowser is in
chrome process in e10s. Thus, the reason for loading
background_video_chrome.js into chrome process and invoking functions
via async messages.

MozReview-Commit-ID: 2eE97FEUMPu

--HG--
extra : rebase_source : e48cc4dab54648bf0830f59f346a09ab3fb73f6e
2016-07-04 12:35:25 +10:00