blob: ea0996f810dd39b7ffdd7fdb12460eb50aa710a5 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<script>
description("Tests that navigator.webkitGetUserMedia is present.");
function hasGetUserMediaProperty()
{
for (var property in navigator) {
if (property == "mediaDevices") {
var devices = navigator[property];
for (property in devices) {
if (property == "getUserMedia")
return true;
}
}
}
return false;
}
shouldBeTrue("typeof navigator.mediaDevices == 'object'");
shouldBeTrue("typeof navigator.mediaDevices.getUserMedia == 'function'");
shouldBeTrue("hasGetUserMediaProperty()");
shouldBeTrue("'mediaDevices' in navigator");
shouldBeTrue("'getUserMedia' in navigator.mediaDevices");
shouldBeFalse("navigator.hasOwnProperty('mediaDevices')");
window.jsTestIsAsync = false;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>