Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / mediastream / RTCSessionDescription.html
blobcd380ee8f59e46dd716726f4bc15fb85fb36bbd6
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 <p id="description"></p>
8 <div id="console"></div>
9 <script>
10 description("Tests RTCSessionDescription.");
12 var initializer = {type:"offer", sdp:"foobar"};
13 var sessionDescription;
14 shouldNotThrow("sessionDescription = new RTCSessionDescription(initializer);");
15 shouldBe('sessionDescription.type', '"offer"');
16 shouldBe('sessionDescription.sdp', '"foobar"');
18 shouldNotThrow('initializer = JSON.parse(JSON.stringify(sessionDescription));');
20 shouldNotThrow("sessionDescription = new RTCSessionDescription(initializer);");
21 shouldBe('sessionDescription.type', '"offer"');
22 shouldBe('sessionDescription.sdp', '"foobar"');
24 shouldNotThrow("new RTCSessionDescription();");
25 shouldNotThrow("new RTCSessionDescription({});");
26 shouldThrow("new RTCSessionDescription(5);");
27 shouldThrow("new RTCSessionDescription('foobar');");
28 shouldThrow("new RTCSessionDescription({type:'foobar', sdp:'x'});");
29 shouldNotThrow("new RTCSessionDescription({type:'offer', sdp:''});");
31 shouldNotThrow("new RTCSessionDescription({type:'offer', sdp:'x'});");
32 shouldNotThrow("new RTCSessionDescription({type:'answer', sdp:'x'});");
33 shouldNotThrow("new RTCSessionDescription({type:'pranswer', sdp:'x'});");
35 window.successfullyParsed = true;
36 </script>
37 </body>
38 </html>