blob: a295934b4519638725bfd789cfc260d8b876e48a [file] [log] [blame]
<!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>