| OLD | NEW |
| (Empty) |
| 1 <!DOCTYPE html> | |
| 2 <html> | |
| 3 <script src="../../resources/js-test.js"></script> | |
| 4 <body> | |
| 5 <script type="text/javascript"> | |
| 6 description("Test MediaStream API permission denied callbacks in WebView")
; | |
| 7 window.jsTestIsAsync = true; | |
| 8 | |
| 9 function error(e) { | |
| 10 testPassed('getUserMedia error callback, reason: ' + e.name); | |
| 11 finishJSTest(); | |
| 12 } | |
| 13 | |
| 14 function gotStream(stream) { | |
| 15 testFailed('getUserMedia should not have succeeded.'); | |
| 16 finishJSTest(); | |
| 17 } | |
| 18 | |
| 19 function getUserMedia(constraints, callback) { | |
| 20 try { | |
| 21 navigator.webkitGetUserMedia(constraints, callback, error); | |
| 22 } catch (e) { | |
| 23 testFailed('webkitGetUserMedia threw exception :' + e); | |
| 24 finishJSTest(); | |
| 25 } | |
| 26 } | |
| 27 | |
| 28 getUserMedia({audio:true, video:true}, gotStream); | |
| 29 </script> | |
| 30 </body> | |
| 31 </html> | |
| OLD | NEW |