Source code

Revision control

Copy as Markdown

Other Tools

Test Info: Warnings

<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
promise_test(async t => {
try {
stream = await navigator.mediaDevices.getUserMedia(
{video: {width: {exact: 639}, resizeMode: {exact: "none"}}});
t.step(() => assert_unreached('applyConstraints should have failed'));
} catch(e) {
assert_true(e instanceof DOMException);
assert_equals(, 'OverconstrainedError');
assert_equals(e.constraint, 'width');
}, 'Error of OverconstrainedError type inherit from DOMException');
promise_test(async t => {
assert_true(new OverconstrainedError("constraint") instanceof DOMException);
}, 'OverconstrainedError class inherits from DOMException');