Add support for MediaKeys.setServerCertificate()
authorjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2017 17:25:56 +0000 (17:25 +0000)
committerjer.noble@apple.com <jer.noble@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 10 Jan 2017 17:25:56 +0000 (17:25 +0000)
commit26410a7369ae8cdf73915570a3726d5287f2befb
tree2d7fd23a7c919ee2ebc22904e9cad60388524c82
parente5f95b8305b4874ccff0a1106533143553271f89
Add support for MediaKeys.setServerCertificate()
https://bugs.webkit.org/show_bug.cgi?id=166772

Reviewed by Darin Adler.

Source/WebCore:

Test: media/encrypted-media/mock-MediaKeys-setServerCertificate.html

Implement MediaKeys::setServerCertificate(). This requires some additions
to CDM, CDMPrivate, and CDMInstance to support platform adoption and to
implement mock support for testing.

* Modules/encryptedmedia/CDM.cpp:
(WebCore::CDM::supportsServerCertificates):
* Modules/encryptedmedia/CDM.h:
* Modules/encryptedmedia/CDMInstance.h:
* Modules/encryptedmedia/CDMPrivate.h:
* Modules/encryptedmedia/MediaKeys.cpp:
(WebCore::MediaKeys::setServerCertificate):
* Modules/encryptedmedia/MediaKeys.h:
* testing/MockCDMFactory.cpp:
(WebCore::MockCDM::supportsServerCertificates):
(WebCore::MockCDMInstance::setServerCertificate):
* testing/MockCDMFactory.h:
(WebCore::MockCDMFactory::supportsServerCertificates):
(WebCore::MockCDMFactory::setSupportsServerCertificates):
* testing/MockCDMFactory.idl:

LayoutTests:

* media/encrypted-media/mock-MediaKeys-setServerCertificate-expected.txt: Added.
* media/encrypted-media/mock-MediaKeys-setServerCertificate.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@210549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
15 files changed:
LayoutTests/ChangeLog
LayoutTests/media/encrypted-media/mock-MediaKeys-setServerCertificate-expected.txt [new file with mode: 0644]
LayoutTests/media/encrypted-media/mock-MediaKeys-setServerCertificate.html [new file with mode: 0644]
LayoutTests/platform/mac/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/Modules/encryptedmedia/CDM.cpp
Source/WebCore/Modules/encryptedmedia/CDM.h
Source/WebCore/Modules/encryptedmedia/CDMInstance.h
Source/WebCore/Modules/encryptedmedia/CDMPrivate.h
Source/WebCore/Modules/encryptedmedia/MediaKeySystemAccess.cpp
Source/WebCore/Modules/encryptedmedia/MediaKeys.cpp
Source/WebCore/Modules/encryptedmedia/MediaKeys.h
Source/WebCore/testing/MockCDMFactory.cpp
Source/WebCore/testing/MockCDMFactory.h
Source/WebCore/testing/MockCDMFactory.idl