diff options
Diffstat (limited to 'testing/web-platform/tests/webrtc/resources')
-rw-r--r-- | testing/web-platform/tests/webrtc/resources/RTCCertificate-postMessage-iframe.html | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/web-platform/tests/webrtc/resources/RTCCertificate-postMessage-iframe.html b/testing/web-platform/tests/webrtc/resources/RTCCertificate-postMessage-iframe.html new file mode 100644 index 0000000000..9e52ba0c88 --- /dev/null +++ b/testing/web-platform/tests/webrtc/resources/RTCCertificate-postMessage-iframe.html @@ -0,0 +1,9 @@ +<!doctype html> +<script> +window.onmessage = async (event) => { + let certificate = event.data; + if (!certificate) + certificate = await RTCPeerConnection.generateCertificate({ name: 'ECDSA', namedCurve: 'P-256'}); + event.source.postMessage(certificate, "*"); +} +</script> |