Upstream version 5.34.104.0
[platform/framework/web/crosswalk.git] / src / content / test / data / media / peerconnection-call.html
index 3f1001e..043cbc2 100644 (file)
   function negotiateUnsupportedVideoCodec() {
     createConnections(null);
     transformSdp = removeVideoCodec;
-    navigator.webkitGetUserMedia({audio: true, video: true},
-        addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
     onLocalDescriptionError = function(error) {
       var expectedMsg = 'Failed to set local offer sdp:' +
           ' Session error code: ERROR_CONTENT. Session error description:' +
       // Got the right message, test succeeded.
       document.title = 'OK';
     };
+    navigator.webkitGetUserMedia({audio: true, video: true},
+        addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
   }
 
   // Test that we can't setup a call if one peer does not support encryption
   function negotiateNonCryptoCall() {
     createConnections(null);
     transformSdp = removeCrypto;
-    navigator.webkitGetUserMedia({audio: true, video: true},
-        addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
     onLocalDescriptionError = function(error) {
       var expectedMsg = 'Failed to set local offer sdp:' +
           ' Called with a SDP without crypto enabled.';
       // Got the right message, test succeeded.
       document.title = 'OK';
     };
+    navigator.webkitGetUserMedia({audio: true, video: true},
+        addStreamToBothConnectionsAndNegotiate, printGetUserMediaError);
   }
 
   // Test that we can negotiate a call with an SDP offer that includes a