Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / mediastream / RTCPeerConnection-createOffer.html
blob55e310e98f9068b05e5b3c0558866e9d034dc4ae
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <head>
4 <script src="../../resources/js-test.js"></script>
5 </head>
6 <body>
7 <script>
8 description("Tests RTCPeerConnection createOffer.");
10 var pc = null;
12 function dummy() {}
14 function requestFailed2(reason)
16 testPassed('requestFailed was called.');
18 errorReason = reason;
19 shouldBe('errorReason', '"TEST_ERROR"');
21 shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:-1, offerToReceiveAudio:0});");
22 shouldThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:0, offerToReceiveAudio:-1});");
23 shouldNotThrow("pc.createOffer(dummy, dummy, {offerToReceiveVideo:1, offerToReceiveAudio:0, voiceActivityDetection:false, iceRestart:true});");
25 finishJSTest();
28 function requestSucceeded2(sd)
30 testFailed('requestSucceeded was called.');
31 finishJSTest();
34 function requestFailed1()
36 testFailed('requestFailed was called.');
37 finishJSTest();
40 function requestSucceeded1(sd)
42 testPassed('requestSucceeded was called.');
44 sessionDescription = sd;
45 shouldBe('sessionDescription.type', '"offer"');
47 pc.createOffer(requestSucceeded2, requestFailed2, {mandatory:{"succeed":false}});
50 pc = new webkitRTCPeerConnection(null, null);
51 pc.createOffer(requestSucceeded1, requestFailed1, {mandatory:{"succeed":true}});
53 window.jsTestIsAsync = true;
54 window.successfullyParsed = true;
55 </script>
56 </body>
57 </html>