blob: 7a2ee10b5bc0d24a8c4295deed5b05164a1a07dd [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
var supportedConstraints;
description("Tests MediaDevices.getSupportedConstraints()");
window.jsTestIsAsync = true;
shouldBeType("navigator.mediaDevices", "Object");
shouldBeType("navigator.mediaDevices.getSupportedConstraints", "Function");
debug("");
evalAndLog("supportedConstraints = navigator.mediaDevices.getSupportedConstraints()");
debug("");
shouldBeTrue("supportedConstraints.aspectRatio");
shouldBeTrue("supportedConstraints.deviceId");
shouldBeFalse("supportedConstraints.echoCancellation");
shouldBeTrue("supportedConstraints.facingMode");
shouldBeTrue("supportedConstraints.frameRate");
shouldBeFalse("supportedConstraints.groupId");
shouldBeTrue("supportedConstraints.height");
shouldBeFalse("supportedConstraints.sampleRate");
shouldBeFalse("supportedConstraints.sampleSize");
shouldBeTrue("supportedConstraints.volume");
shouldBeTrue("supportedConstraints.width");
debug("");
finishJSTest();
window.successfullyParsed = true;
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>