chromium/third_party/blink/web_tests/fast/mediastream/MediaDevices-getSupportedConstraints.html

<!DOCTYPE HTML>
<title>mediaDevices.getSupportedConstraints</title>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>

// Tests that getSupportedConstraints() returns what it should.
test(function() {
  supported_constraints = navigator.mediaDevices.getSupportedConstraints();
  assert_true(supported_constraints.width);
  assert_true(supported_constraints.height);
  assert_true(supported_constraints.aspectRatio);
  assert_true(supported_constraints.frameRate);
  assert_true(supported_constraints.facingMode);
  assert_true(supported_constraints.resizeMode);
  assert_true(supported_constraints.sampleRate);
  assert_true(supported_constraints.sampleSize);
  assert_true(supported_constraints.echoCancellation);
  assert_true(supported_constraints.autoGainControl);
  assert_true(supported_constraints.noiseSuppression);
  assert_true(supported_constraints.voiceIsolation);
  assert_true(supported_constraints.latency);
  assert_true(supported_constraints.channelCount);
  assert_true(supported_constraints.deviceId);
  assert_true(supported_constraints.groupId);
  // All non-supported values are "undefined".
  assert_true(supported_constraints.nonsense === undefined);
}, 'Supported constraints returns good data');

</script>