Bug 1309299 - make navigator.requestMediaKeySystemAccess() reject with TypeError for empty keysystem string or config. r?gerald
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
--- a/dom/media/eme/MediaKeySystemAccessManager.cpp
+++ b/dom/media/eme/MediaKeySystemAccessManager.cpp
@@ -60,21 +60,16 @@ MediaKeySystemAccessManager::~MediaKeySy
Shutdown();
}
void
MediaKeySystemAccessManager::Request(DetailedPromise* aPromise,
const nsAString& aKeySystem,
const Sequence<MediaKeySystemConfiguration>& aConfigs)
{
- if (aKeySystem.IsEmpty() || aConfigs.IsEmpty()) {
- aPromise->MaybeReject(NS_ERROR_DOM_INVALID_ACCESS_ERR,
- NS_LITERAL_CSTRING("Invalid keysystem type or invalid options sequence"));
- return;
- }
Request(aPromise, aKeySystem, aConfigs, RequestType::Initial);
}
void
MediaKeySystemAccessManager::Request(DetailedPromise* aPromise,
const nsAString& aKeySystem,
const Sequence<MediaKeySystemConfiguration>& aConfigs,
RequestType aType)