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

19 Коммитов

Автор SHA1 Сообщение Дата
Brian Grinstead 0d460e3432 Bug 1544322 - Part 2.2 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in dom/ r=bzbarsky
This is split from the previous changeset since if we include dom/ the file size is too
large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:53:28 +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
Chris Pearce 9f21b62342 Bug 1443942 - Switch over to midflight redirect for all redirect media tests. r=jya
We have two SJS files; midflight-redirect.sjs and dynamic_redirect.sjs,
which are very similar, but dynamic_redirect.sjs is buggy, so we should
just use midflight-redirect.sjs.

dynamic_redirect.sjs is buggy because it relies on the client doing multiple
HTTP requests to it in order to redirect, but we can't actually guarantee
this. Previously users of it would try things like setting a small MediaCache
size, or only using Ogg for which we expect a seek to the end to calculate
the duration, but I have observed the entire resource being downloaded in
one hit before the media element has finished loading metadata, meaning the
seek (in the Ogg case) can happen without another HTTP request. This is even
with a small MediaCache.

midfligh-redirect.sjs solves this problem by explicitly only returning a
partial response, so the client is forced to make another HTTP request,
which we will serve a redirect to.

MozReview-Commit-ID: 39imyayhnBG

--HG--
extra : rebase_source : 603532e4af0bf304c34739de5b0b243174e3831d
2018-03-29 18:16:33 +13:00
Chris Pearce 99ff9f62be Bug 1443943 - Ensure redirect SJS' serve the correct content types. r=jya
dynamic_redirect.sjs and midflight-redirect.sjs are serving files
with "Content-Type: video/ogg", which is incorrect and could lead
to problems given that we're not always asking it to serve Ogg
files. So include the type be to served as a query parameter.

MozReview-Commit-ID: 5f0PXy8lL3G

--HG--
extra : rebase_source : 757395a21317655422767efe3f7c1923a19c0114
2018-03-28 16:51:04 +13:00
Bryce Van Dyk ae6127795a Bug 1371166 - Explicitly load videos via video.load to get a cross origin requests to take place. r=jib
Change where load calls are used in media recorder principals test to more
reliably force cross origin requests.

MozReview-Commit-ID: 7La6ZIRmsTQ

--HG--
extra : rebase_source : 58b8049de46ad5800300033dd4ee101e68171c70
2017-08-11 12:32:14 +12:00
Bryce Van Dyk 3d0715f83c Bug 1371166 - Drive by update to update var -> let in test. r=jib
MozReview-Commit-ID: TAP46fR2HP

--HG--
extra : rebase_source : cf18f0e784ddd3bddb80239a55d7aad2dd7548c7
2017-07-21 16:00:23 +12:00
Bryce Van Dyk 33b5a6112c Bug 1371166 - Update media recorder principal test to behave more like MediaElement principal test. r=jib
Update the MediaRecorder principal test to behave more like
test_mixed_principals.html. This involves preloading metadata and using a
longer video to test with. This particular combination currently results in
multiple requests being made for the resource, however this is not a robust
solution in that the behaviour of the MediaCache and associated objects may
change and break this. This fixes the issue for now as best I can tell, but
a follow up gtest or may be a more sensible long term solution.

MozReview-Commit-ID: F9gnnzGt3Cu

--HG--
extra : rebase_source : 8444f135033fbed350266ebfe5faafc245ff5596
2017-07-21 15:59:27 +12:00
Bryce Van Dyk 709f4631a2 Bug 1275856 - Expand MediaRecorder tests to check stack traces when MediaRecorderErrorEvent is fired. r=jib
MozReview-Commit-ID: 6NnaHt24ecz

--HG--
extra : rebase_source : 9c3f7281e0156869ea44eb52997b4a4a67442ec3
2017-08-09 19:55:54 +12:00
Bryce Van Dyk 7914380985 Bug 1275856- Update tests to reflect new MediaRecorderErrorEvent. r=jib
MediaRecorderErrorEvent is now fired in response to async errors in the
MediaRecorder. This event wraps a DOMException and tests need to be updated to
reflect this new behaviour.

MozReview-Commit-ID: JIjIZlJJ8PE

--HG--
extra : rebase_source : b8adde26f5321b5b8a3c8e193c5744d6f3403cf5
2017-07-28 09:04:11 +12:00
Wes Kocher 47df5726ac Backed out 6 changesets (bug 1275856) for failures in test_interfaces.html and test_all_synthetic_events.html a=backout
Backed out changeset d229d269ac55 (bug 1275856)
Backed out changeset 2fb8d23f1ece (bug 1275856)
Backed out changeset 210e8d6d5f85 (bug 1275856)
Backed out changeset 38739c5a3ae8 (bug 1275856)
Backed out changeset 1c8e6dd99100 (bug 1275856)
Backed out changeset 407dc5f8de5b (bug 1275856)

MozReview-Commit-ID: CeTwTrzfY2P
2017-08-10 16:32:12 -07:00
Bryce Van Dyk 2132f1c772 Bug 1275856 - Expand MediaRecorder tests to check stack traces when MediaRecorderErrorEvent is fired. r=jib
MozReview-Commit-ID: 6NnaHt24ecz

--HG--
extra : rebase_source : db836fef72f63ae469f6672362e7418e045f8cb5
2017-08-09 19:55:54 +12:00
Bryce Van Dyk f571e0f7e0 Bug 1275856- Update tests to reflect new MediaRecorderErrorEvent. r=jib
MediaRecorderErrorEvent is now fired in response to async errors in the
MediaRecorder. This event wraps a DOMException and tests need to be updated to
reflect this new behaviour.

MozReview-Commit-ID: JIjIZlJJ8PE

--HG--
extra : rebase_source : f9667b8a1b2a82959624831f3ef5109c19fccbd6
2017-07-28 09:04:11 +12:00
Wes Kocher fcc677950d Backed out 2 changesets (bug 1371166) for Windows 8 permafails in test_mediarecorder_principals.html a=backout
Backed out changeset 955998eefbe8 (bug 1371166)
Backed out changeset 736042ec645d (bug 1371166)

MozReview-Commit-ID: 11duLALJ9PW
2017-07-24 14:50:47 -07:00
Bryce Van Dyk 707c1f194e Bug 1371166 - Drive by update to update var -> let in test. r=jib
MozReview-Commit-ID: TAP46fR2HP

--HG--
extra : rebase_source : 246f4470db492d56260135e5872e4ee165bdbd08
2017-07-21 16:00:23 +12:00
Bryce Van Dyk f1dcd007cd Bug 1371166 - Update media recorder principal test to behave more like MediaElement principal test. r=jib
Update the MediaRecorder principal test to behave more like
test_mixed_principals.html. This involves preloading metadata and using a
longer video to test with. This particular combination currently results in
multiple requests being made for the resource, however this is not a robust
solution in that the behaviour of the MediaCache and associated objects may
change and break this. This fixes the issue for now as best I can tell, but
a follow up gtest or may be a more sensible long term solution.

MozReview-Commit-ID: F9gnnzGt3Cu

--HG--
extra : rebase_source : 73f56e256c21f5a775e0fa2a32606d7f7553bd4e
2017-07-21 15:59:27 +12:00
Andrea Marchesini 2f974ccbce Bug 1318273 - Improve the use of SpecialPowers.pushPrefEnv() - part 1, r=qdot 2016-11-18 09:33:33 +01:00
Sebastian Hengst 7110a88674 Backed out changeset d43b778d95c6 (bug 1318273) for failing mochitest fetch/test_formdataparsing.html. r=backout on a CLOSED TREE 2016-11-17 20:58:38 +01:00
Andrea Marchesini cf2ad8072f Bug 1318273 - Improve the use of SpecialPowers.pushPrefEnv() - part 1, r=qdot 2016-11-17 19:36:01 +01:00
Jan-Ivar Bruaroey 8be6f5c685 Bug 1018299 - Test for changing principals in recorder. r=mt
MozReview-Commit-ID: 5z8AFKMSwgo

--HG--
extra : rebase_source : 08f8184b4425a070db357c14bda724b1e511bc36
extra : source : ac17a3998b2fe9d09a46bf780b66a3225fb3d66e
2016-04-05 14:36:48 -04:00