Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <head> | |
| 4 <title>RTCPeerConnection.getStats</title> | |
| 5 <script src="../../resources/testharness.js"></script> | |
| 6 <script src="../../resources/testharnessreport.js"></script> | |
| 7 </head> | |
| 8 <body> | |
| 9 <script> | |
| 10 var pc = new webkitRTCPeerConnection(null); | |
|
hta - Chromium
2016/07/21 23:02:37
I don't think you should indent the Javascript due
hbos_chromium
2016/07/22 15:08:20
Other RTCPeerConnection testharness tests look thi
| |
| 11 | |
| 12 promise_test(function() { | |
| 13 return navigator.mediaDevices.getUserMedia({audio:true, video:true}).the n(function(mediaStream) { | |
|
hta - Chromium
2016/07/21 23:02:37
Note that the examples in https://www.chromium.org
hbos_chromium
2016/07/22 15:08:20
Done.
| |
| 14 pc.addStream(mediaStream); | |
| 15 var selector = pc.getLocalStreams()[0].getVideoTracks()[0]; | |
| 16 assert_not_equals(selector, null); | |
| 17 return pc.getStats(selector).then( | |
| 18 function(statsReport) { | |
| 19 assert_unreached('Expected promise to be rejected.'); | |
| 20 }, | |
| 21 function(reason) { | |
| 22 // Expecting promise to be rejected until getStats is implemented. | |
| 23 // crbug.com/627816 | |
| 24 }); | |
| 25 }); | |
| 26 }, 'getStats(MediaStreamTrack selector)'); | |
| 27 | |
| 28 promise_test(function() { | |
| 29 return navigator.mediaDevices.getUserMedia({audio:true, video:true}).the n(function(mediaStream) { | |
| 30 pc.addStream(mediaStream); | |
| 31 return pc.getStats(null).then( | |
| 32 function(statsReport) { | |
| 33 assert_unreached('Expected promise to be rejected.'); | |
|
hta - Chromium
2016/07/21 23:02:37
Use form "The promise should be rejected".
hbos_chromium
2016/07/22 15:08:20
Done.
| |
| 34 }, | |
| 35 function(reason) { | |
| 36 // Expecting promise to be rejected until getStats is implemented. | |
| 37 // crbug.com/627816 | |
| 38 }); | |
| 39 }); | |
| 40 }, 'getStats(null)'); | |
| 41 | |
| 42 promise_test(function() { | |
| 43 return navigator.mediaDevices.getUserMedia({audio:true, video:true}).the n(function(mediaStream) { | |
| 44 pc.addStream(mediaStream); | |
| 45 return pc.getStats().then( | |
| 46 function(statsReport) { | |
| 47 assert_unreached('Expected promise to be rejected.'); | |
| 48 }, | |
| 49 function(reason) { | |
| 50 // Expecting promise to be rejected until getStats is implemented. | |
| 51 // crbug.com/627816 | |
| 52 }); | |
| 53 }); | |
| 54 }, 'getStats()'); | |
| 55 </script> | |
| 56 </body> | |
| 57 </html> | |
| OLD | NEW |