chromium/third_party/blink/web_tests/fast/forms/color/input-color-choose-default-value-after-set-value.html

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script src="../resources/common.js"></script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<input type="color" id="input" value="#ffffff">
<script>
description('Test if change event fires when the user selects the default value after the value was changed by JS.');
jsTestIsAsync = true;

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

input.onchange = function() {
    debug("onchange fired: " + input.value);
    finishJSTest();
};

clickElement(input);
input.value = '#ff0000';
shouldBe('input.value', '"#ff0000"');
internals.selectColorInColorChooser(input, '#ffffff');
shouldBe('input.value', '"#ffffff"');
internals.endColorChooser(input);
</script>
</body>
</html>