Граф коммитов

17 Коммитов

Автор SHA1 Сообщение Дата
alwu 9edb9d310f Bug 1685399 - part2 : reorgnize functions being used for determining if element is visible. r=padenot,webidl,mccr8
There are several functions related with an element's visibie state, which are confusing. So this patch is going to make them clearer and remove unnecessary function.

- `IsVisible()` : add description to mention that the visibility state is only for layout level, which doesn't represent the actual visible state.
- rename `IsHidden()` to `IsActualInvisible()` : make it represent the actual visible state of an element.
- remove `IsActive()` : current two callers of `IsActive()` only care about if the page is inactive or not, it doesn't care about if page hidden or not. So we can call the owner doc's method directly.

Differential Revision: https://phabricator.services.mozilla.com/D101107
2021-01-19 19:48:43 +00:00
Mark Banner a33eda17f6 Bug 1556854 - Enable ESLint for dom/media/test/ - Enable ESLint rules no-undef and no-unused-vars. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D50132

--HG--
extra : moz-landing-system : lando
2019-10-24 10:50:59 +00:00
Mark Banner 7c19d4e5c5 Bug 1556854 - Enable ESLint for dom/media/test/ - Enable prettier and ESLint rules curly and mozilla/consistent-if-bracing. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D37752

--HG--
extra : moz-landing-system : lando
2019-10-24 10:51:12 +00:00
Narcis Beleuzu 6a96b612b6 Backed out 5 changesets (bug 1556854) for mda failures on /test_media_selection.html CLOSED TREE
Backed out changeset 61a4022333fa (bug 1556854)
Backed out changeset cfd809c63877 (bug 1556854)
Backed out changeset 057cc9878594 (bug 1556854)
Backed out changeset 0f02ff8a5c67 (bug 1556854)
Backed out changeset 8719996c65b3 (bug 1556854)
2019-10-24 13:47:37 +03:00
Mark Banner 017194d48c Bug 1556854 - Enable ESLint for dom/media/test/ - Enable ESLint rules no-undef and no-unused-vars. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D50132

--HG--
extra : moz-landing-system : lando
2019-10-24 08:58:24 +00:00
Mark Banner 729f24878c Bug 1556854 - Enable ESLint for dom/media/test/ - Enable prettier and ESLint rules curly and mozilla/consistent-if-bracing. r=jya
Differential Revision: https://phabricator.services.mozilla.com/D37752

--HG--
extra : moz-landing-system : lando
2019-10-24 08:57:59 +00:00
sotaro 5542810b9b Bug 1530579 - Wait that video element becomes visible before loading the test video r=jya
Append a video element to document with loading the test video triggered 'mozentervideosuspend' event. It caused the test failure.

Differential Revision: https://phabricator.services.mozilla.com/D21499

--HG--
extra : moz-landing-system : lando
2019-02-28 23:38:20 +00:00
Alastor Wu 862fdf36a9 Bug 1511235 - part3 : ensure video is visible before starting test r=jya,baku
Add testing function to know whether video is visible or not.

Differential Revision: https://phabricator.services.mozilla.com/D14667

--HG--
extra : moz-landing-system : lando
2018-12-21 06:40:10 +00:00
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