<!doctype html>
<html>
    <head>
        <meta charset="utf-8">
        <title>getDisplayMedia track support of max constraints</title>
        <script src="../../resources/testharness.js"></script>
        <script src="../../resources/testharnessreport.js"></script>
        <script src="resources/getDisplayMedia-utils.js"></script>
    </head>
    <body>
        <script>
let defaultWidth;
let defaultHeight;
promise_test(async () => {
    stream = await callGetDisplayMedia({ video: true });
    let settings = stream.getVideoTracks()[0].getSettings();
    defaultWidth = settings.width;
    defaultHeight = settings.height;
}, "setup");

promise_test(async (test) => {
    const stream = await callGetDisplayMedia({ video: { height: { max: 500000 }, width : { max : 500000 } } });
    assert_equals(stream.getVideoTracks()[0].getConstraints().height.max, 500000);
    assert_equals(stream.getVideoTracks()[0].getConstraints().width.max, 500000);

    await waitForHeight(stream.getVideoTracks()[0], defaultHeight);

    const settings = stream.getVideoTracks()[0].getSettings()
    assert_equals(settings.width, defaultWidth);
}, "No effect of the max values if they are too big");
        </script>
    </body>
</html>
