w3c / encrypted-media

Encrypted Media Extensions
https://w3c.github.io/encrypted-media/
Other
180 stars 80 forks source link

Change the wording for setServerCertificate() to reject promise on error #435

Closed jrummell-chromium closed 6 years ago

jrummell-chromium commented 6 years ago

This matches the wording used for other failures noted in the spec.


Preview | Diff

jrummell-chromium commented 6 years ago

Updated with changes suggested.

ddorwin commented 6 years ago

@plehegar This is our first post-REC fix. Any objections to merging?

plehegar commented 6 years ago

does this change need any update in our tests?

ddorwin commented 6 years ago

@plehegar This just fixes the text to say what we all assumed. You wouldn't resolve a promise with an exception.

It's a bit hard to tell, but I think this is tested in https://github.com/w3c/web-platform-tests/blob/127149deae691db3ab42601649afcf1a200ffeef/encrypted-media/scripts/syntax-mediakeys.js#L128 - the promise rejection triggers the catch(), which checks for a DOMExceptin type. More definitively, resolving with a DOMException would fall into the then() block on the line above and the result would not match expected: false on line 135.

plehegar commented 6 years ago

Marked as non substantive for IPR from ash-nazg.