<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test.js"></script>
<script>
description('Changing the input type from "color" to another in "input" event handler should not crash.');

function runTest() {
    var input = document.createElement('input');
    input.type = 'color';
    input.oninput = function() {
        this.type = 'text';
    };
    internals.selectColorInColorChooser(input, '#ff0000');
}

runTest();
</script>
</body>
</html>
