| Index: content/test/data/media/peerconnection-call.html
|
| diff --git a/content/test/data/media/peerconnection-call.html b/content/test/data/media/peerconnection-call.html
|
| index 12ae9ef8711eb5141cde29943da5e26e24e81857..3c782bfe21c4221600368fae55976b2c3c107c23 100644
|
| --- a/content/test/data/media/peerconnection-call.html
|
| +++ b/content/test/data/media/peerconnection-call.html
|
| @@ -551,6 +551,33 @@
|
| });
|
| }
|
|
|
| + // Loads this page inside itself using an iframe, and ensures we can make a
|
| + // successful getUserMedia + peerconnection call inside the iframe.
|
| + function callInsideIframe(constraints) {
|
| + runInsideIframe(function(iframe) {
|
| + // Run a regular webrtc call inside the iframe.
|
| + iframe.contentWindow.call(constraints);
|
| + });
|
| + }
|
| +
|
| + // Func should accept an iframe as its first argument.
|
| + function runInsideIframe(func) {
|
| + var iframe = document.createElement('iframe');
|
| + document.body.appendChild(iframe);
|
| + iframe.onload = onIframeLoaded;
|
| + iframe.src = window.location;
|
| +
|
| + function onIframeLoaded() {
|
| + var iframe = window.document.querySelector('iframe');
|
| +
|
| + // Propagate test success out of the iframe.
|
| + iframe.contentWindow.setAllEventsOccuredHandler(
|
| + window.parent.reportTestSuccess);
|
| +
|
| + func(iframe);
|
| + }
|
| + }
|
| +
|
| // This function is used for setting up a test that:
|
| // 1. Creates a data channel on |gFirstConnection| and sends data to
|
| // |gSecondConnection|.
|
|
|