|
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 }); |
|
18 |
|
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"); |
|
24 |
|
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 ]]); |
|
36 |
|
37 test.run(); |
|
38 }); |
|
39 </script> |
|
40 </pre> |
|
41 </body> |
|
42 </html> |