Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

  • This test has a WPT meta file that expects 9 subtest issues.
  • This WPT test may be referenced by the following Test IDs:
<!doctype html>
<meta charset="utf-8" />
<meta name="timeout" content="long" />
<title>HTMLUserMediaElement setConstraints() microphone behavior combinations</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
<script src="resources/set-constraints-helper.js"></script>
<body>
<script>
const testCases = [
// type="microphone"
{ type: "microphone", video: undefined, audio: undefined, expVideo: 0, expAudio: 0 },
{ type: "microphone", video: undefined, audio: true, expVideo: 0, expAudio: 1 },
{ type: "microphone", video: false, audio: true, expVideo: 0, expAudio: 1 },
{ type: "microphone", video: true, audio: true, expVideo: 0, expAudio: 1 },
{ type: "microphone", video: undefined, audio: false, expVideo: 0, expAudio: 0 },
{ type: "microphone", video: false, audio: false, expVideo: 0, expAudio: 0 },
{ type: "microphone", video: true, audio: false, expVideo: 0, expAudio: 0 },
{ type: "microphone", video: false, audio: undefined, expVideo: 0, expAudio: 0 },
{ type: "microphone", video: true, audio: undefined, expVideo: 0, expAudio: 0 },
];
runSetConstraintsTests(testCases);
</script>
</body>