dom/media/tests/mochitest/test_peerConnection_setRemoteAnswerInHaveRemoteOffer.html

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 <!DOCTYPE HTML>
     2 <html>
     3 <head>
     4   <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
     5   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     6   <script type="application/javascript" src="head.js"></script>
     7   <script type="application/javascript" src="mediaStreamPlayback.js"></script>
     8   <script type="application/javascript" src="pc.js"></script>
     9   <script type="application/javascript" src="templates.js"></script>
    10 </head>
    11 <body>
    12 <pre id="test">
    13 <script type="application/javascript">
    14   createHTML({
    15     bug: "784519",
    16     title: "setRemoteDescription (answer) in 'have-remote-offer'"
    17   });
    19   var test;
    20   runTest(function () {
    21     test = new PeerConnectionTest();
    22     test.setMediaConstraints([{audio: true}], [{audio: true}]);
    23     test.chain.removeAfter("PC_REMOTE_SET_REMOTE_DESCRIPTION");
    25     test.chain.append([[
    26       "PC_REMOTE_SET_REMOTE_ANSWER",
    27       function (test) {
    28         test.pcLocal._last_offer.type="answer";
    29         test.pcRemote.setRemoteDescriptionAndFail(test.pcLocal._last_offer,
    30           function(err) {
    31             is(err.name, "INVALID_STATE", "Error is INVALID_STATE");
    32             test.next();
    33           } );
    34       }
    35     ]]);
    37     test.run();
    38   });
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial