<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<script>
description('This test aims to check for rangeOverflow flag with week input fields');

var input = document.createElement('input');

function checkOverflow(value, max, disabled)
{
    input.value = value;
    input.max = max;
    input.disabled = !!disabled;
    var overflow = input.validity.rangeOverflow;
    var resultText = 'The value "' + input.value + '" ' +
        (overflow ? 'overflows' : 'doesn\'t overflow') +
        ' the maximum value "' + input.max + '"' + (disabled ? ' when disabled.' : '.');
    if (overflow)
        testPassed(resultText);
    else
        testFailed(resultText);
}

function checkNotOverflow(value, max, disabled, sanitized)
{
    input.value = value;
    input.max = max;
    input.disabled = !!disabled;
    var overflow = input.validity.rangeOverflow;
    var resultText = 'The value "' + input.value + '" ' +
        (sanitized ? 'sanitized from "' + value + '" ' : '') +
        (overflow ? 'overflows' : 'doesn\'t overflow') +
        ' the maximum value "' + input.max + '"' + (disabled ? ' when disabled.' : '.');
    if (overflow)
        testFailed(resultText);
    else
        testPassed(resultText);
}

function checkSanitizedValueNotOverflow(value, max, disabled)
{
    // For date types, invalid values are sanitized to "".
    checkNotOverflow(value, max, disabled, true);
}

input.type = 'week';
input.min = '';
// No overflow cases
checkNotOverflow('2010-W01', null);
checkNotOverflow('2010-W01', '');
checkNotOverflow('2010-W01', 'foo');
checkNotOverflow('2010-W01', '2010-W01');
checkNotOverflow('2010-W01', '2010-W02');
checkNotOverflow('2010-W01', '2011-W01');
checkSanitizedValueNotOverflow('foo', '2011-W01');
checkNotOverflow('2010-W01', '0000-W01'); // Invalid max value.

// Overflow cases
checkOverflow('2010-W01', '1582-W01');
checkOverflow('2010-W01', '2009-W12');
checkOverflow('9999-W01', '2010-W12');
input.min = '2010-W02';  // value < min && value > max
checkOverflow('2010-W01', '2009-W50');

// Disabled
checkOverflow('9999-W01', '2010-W12', true);
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>
