<!DOCTYPE html>
<html>
<script src="../../resources/js-test.js"></script>
<body>
<script type="text/javascript">
description("Test MediaStream API permission denied callbacks in WebView");
window.jsTestIsAsync = true;
function error(e) {
testPassed('getUserMedia error callback, reason: ' + e.name);
finishJSTest();
}
function gotStream(stream) {
testFailed('getUserMedia should not have succeeded.');
finishJSTest();
}
function getUserMedia(constraints, callback) {
try {
navigator.webkitGetUserMedia(constraints, callback, error);
} catch (e) {
testFailed('webkitGetUserMedia threw exception :' + e);
finishJSTest();
}
}
getUserMedia({audio:true, video:true}, gotStream);
</script>
</body>
</html>