This makes us match the spec and pass more cases of
http://www.w3c-test.org/encrypted-media/drm-mp4-syntax-mediakeysystemaccess.html
but we still need to adjust the test so that it's consistent, as pointed out
by bz.
MozReview-Commit-ID: KEfRk4QnJKR
--HG--
extra : rebase_source : feba0407aa8742b58b8f976bf31a494ea65c5319
Bug 1307016 attempted to address issues with output not being ascii and thus
being incompatible with terminals on test machines. However my changes in that
bug introduced two issues:
- They introduced a bug where field names were being read from an incorrect
source.
- They attempted to construct a string internally then converted that string to
ascii replacing non-ascii chars. This is an issue as in python 2 strings are
implicitly ascii, so the initial conversion to a string would fail if the
underlying object couldn't be represented as ascii.
Both of these issues are addressed here. The first by fixing the bad source in
the code, the second by converting to unicode for the intermediate
representation.
MozReview-Commit-ID: HC6Fd9TLRe2
--HG--
extra : rebase_source : bb7493b9074baa0273fb4110465f8bd13477f1d6
The U2F.cpp code fails to test all returns from CryptoBuffer.Assign(),
leading (when OOM) to potentially empty registration keys (during Register),
or empty attestations (during Sign).
This is a protocol violation, and forced testing at Dropbox,
u2fdemo.appspot.com, and u2f.bin.coffee show that those Relying Parties'
implementations properly error out if the registration or attestation is empty,
as would happen in this instance.
As this is only on an OOM condition, it's not really feasible to add an
automated test.
Also catches one other Assign() that isn't properly returning
"NS_ERROR_OUT_OF_MEMORY".
The test change makes sure the test actually tests this codepath. The resulting
test changes are all due to the test now recognizing <pre> as preformatted.
Now that we can link gmp-clearkey's PSSH parser into Gecko, we can
simply use that inside MediaKeySession to validate that the CENC
init data matches the spec.
This change enforces that CENC init data uses the common system Id.
As far as I can tell, Widevine only uses that now.
MozReview-Commit-ID: HrlKQHcv5DI
--HG--
extra : source : f61138f1030e87026eb432e83d36e46c81e55b33
Use a WebIDL dict to define the "keyids" EME init data format, and
then use that to parse and validate incomint "keyids" EME init data
and ensure it's in the expected JSON format, i.e.:
https://w3c.github.io/encrypted-media/format-registry/initdata/keyids.html
This means we now pass the "generateRequest() with too short key ID."
case of encrypted-media-generate-request-disallowed-input.html
(upstream that is, our local copy of that WPT is out of sync).
MozReview-Commit-ID: 6W7j2a9Bg7E
--HG--
extra : source : fed2a26df89a5c2a600a6e6d1ab63ab86706fc45
Implement more of MediaKeySession.generateRequest() to validate initData before
passing to CDM.
Also throw TypeErrors when initData is not valid, as per the spec.
Only trivial validation happens here, I'll add more comprehensive validation in
subsequent patches.
MozReview-Commit-ID: 3jTOsJNvRDo
--HG--
extra : source : d023aec75d1ef1486116510efcc31e2b587e6e50
This is reworking the U2F tests to do two things:
1) Don't run all the tests in one big frame; that makes it hard to tell
what test is actually dying in Treeherder.
2) Fix the obvious possible test races with the async functions which could be
causing the intermittent
- Review updates per keeler
- Change inappropriate uses of 'var' to 'let' in u2futil.js (kudos, keeler)
- Rework frame_no_token.html to follow the same pattern as the others
- Catch unexpected messages on the u2f testing harness
- Update 2: Go back to a pre-set number of expected async tests.
MozReview-Commit-ID: 6uLt5O1lUa3
--HG--
rename : dom/u2f/tests/test_frame_appid_facet.html => dom/u2f/tests/frame_appid_facet.html
rename : dom/u2f/tests/test_frame_appid_facet_insecure.html => dom/u2f/tests/frame_appid_facet_insecure.html
rename : dom/u2f/tests/test_frame_appid_facet_subdomain.html => dom/u2f/tests/frame_appid_facet_subdomain.html
rename : dom/u2f/tests/test_frame_register.html => dom/u2f/tests/frame_register.html
rename : dom/u2f/tests/test_frame_register_sign.html => dom/u2f/tests/frame_register_sign.html
extra : rebase_source : 1255bd8ba17a141c3c8205a277c06c483540de90
This guarantees that an interface type returned from a [Cached] or [StoreInSlot]
getter must be wrappercached, because non-wrappercached things can only be
returned from [NewObject] getters or methods.
It's possible the plugin key doesn't exist, there's no need to warn about that.
MozReview-Commit-ID: Law8J9zUHCt
--HG--
extra : rebase_source : d80ac46094c55281490659d622a4cdd8c2a95c86
It's not possible to construct a useful Origin header when we have
an expanded principal and are about to perform a CORS fetch. Therefore,
instead of sending a CORS fetch with an |Origin: null| header, we
must fail the request.
The WMFDecoderModule can override Supports(TrackInfo) to reject resolutions
that we know are too big for the platform decoder.
MozReview-Commit-ID: dU905wjZcJ
--HG--
extra : rebase_source : 40e5987deeffff652a88264f157391c0dbc0a2da
MP4Decoder can translate the new MediaContentType into the relevant TrackInfo
to interrogate PDMs about codec support, with extra information if present.
MozReview-Commit-ID: K0jcYm8pJrp
--HG--
extra : rebase_source : e809824285a85035b81ad7f91406bce6393384f6
Add a new method alongside SupportsMimeType, which takes a TrackInfo that may
contain more information that just the MIME type.
Eventually the old SupportsMimeType should be removed, but we keep it for now,
as it is used quite extensively and it would be out of scope of this bug to
totally replace it now.
MozReview-Commit-ID: LJQBvSUB6J2
--HG--
extra : rebase_source : 6f43bf61dc6e51de3714c9a556428c7ba4fd484d
Create a TrackInfo (VideoInfo or AudioInfo) from a codec MIME type, and
optionally with extra parameters from a MediaContentType.
MozReview-Commit-ID: JfDMQjVgCNT
--HG--
extra : rebase_source : 10eb8f14ce28a74883752c536b2312658bc0cb4d
Just passing the new MediaContentType struct, with no processing changes (yet).
MozReview-Commit-ID: KZ4xkCihPb1
--HG--
extra : rebase_source : e40eb72cc63e0a814306c25ea9b609178517729e
Since I want to use more agent's functions in MediaElement and I don't think these functions need to be exposed on IDL level. (for other languages binding)
Therefore, I want to use AudioChannelAgent directly in MediaElement.
MozReview-Commit-ID: 43FvDeLpZPt
--HG--
extra : rebase_source : 78741d791eb66cfb6223866ce823f217e3438fdb
Regression by bug1262053 because of removing the current playing checking.
It would cause that the media control on Fennec shows too early and some media
elements would also generate the media control even it doens't have available
source.
Therefore, I think we still need to add this checking back.
MozReview-Commit-ID: 1m1ywmLmpSe
--HG--
extra : rebase_source : 30741b0e7bf1bb15349caaf1ecbcdad8cd92dcc3
These methods don't need to be exposed anymore.
They are still used in the cpp, so we keep them there as static functions.
MozReview-Commit-ID: F1BxEFzj7Re
--HG--
extra : rebase_source : 458b92a2b8987007ed68f32bbf26eaf4cf46742f
Just moving a function, it will help review upcoming changes in the next patch.
MozReview-Commit-ID: Ilbhinse9C6
--HG--
extra : rebase_source : 1a62ac51fbb33c5cc19f58b34ede28e91fa96d0a
Replace both uses of nsContentTypeParser with MediaContentType.
MozReview-Commit-ID: KV7ze3ASRf3
--HG--
extra : rebase_source : b3d102b02fa671d0a42d70ae7fe66bdd51ac5d86
Instead of taking MIME&codecs strings, CanHandleContentType takes an
MediaContentType, which can be used to access these and other parameters.
MozReview-Commit-ID: 14Cg6JoQS0g
--HG--
extra : rebase_source : 85b8e852f004b2728b06831c43b33ee4e7aebe52
Collect all parsed parameters in a handy MediaContentType structure.
MozReview-Commit-ID: DlnilsmO1eP
--HG--
extra : rebase_source : 823717a46e698342dce0f9e0b5bbfab21281297d
GetType() and GetParameter() don't actually modify the nsContentTypeParser
object, so we can make them const.
It makes it possible to pass the parser as a const-ref, which I think makes
sense as getters (even those doing some actual work) are usually const.
MozReview-Commit-ID: 9vmqKbmt8y8
--HG--
extra : rebase_source : d07371c8cdcf116952bffafad0cd6cda78f59b20