Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / mediastream / RTCPeerConnection-onnegotiationneeded.html
blob3cd322e9ddac4e24c203ffefedf764520a4a4b34
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 onnegotiationneeded.");
10 var stream = null;
11 var pc = null;
13 function error() {
14 testFailed('Stream generation failed.');
15 finishJSTest();
18 function getUserMedia(dictionary, callback) {
19 try {
20 navigator.webkitGetUserMedia(dictionary, callback, error);
21 } catch (e) {
22 testFailed('webkitGetUserMedia threw exception :' + e);
23 finishJSTest();
27 function onNegotiationNeeded(event) {
28 testPassed('onNegotiationNeeded was called.');
30 finishJSTest();
33 function gotStream(s) {
34 testPassed('Got a stream.');
35 stream = s;
37 pc = new webkitRTCPeerConnection(null, null);
38 pc.onnegotiationneeded = onNegotiationNeeded;
40 pc.addStream(stream);
43 getUserMedia({audio:true, video:true}, gotStream);
45 window.jsTestIsAsync = true;
46 window.successfullyParsed = true;
47 </script>
48 </body>
49 </html>