Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Unified Diff: LayoutTests/fast/forms/color/input-color-choose-default-value-after-set-value.html

Issue 23851005: Change event isn't firing when the user reverts the value of a color/date/time input after JS cha… (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: updated test expectation Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/forms/color/input-color-choose-default-value-after-set-value.html
diff --git a/LayoutTests/fast/forms/color/input-color-choose-default-value-after-set-value.html b/LayoutTests/fast/forms/color/input-color-choose-default-value-after-set-value.html
new file mode 100644
index 0000000000000000000000000000000000000000..e2da9b5460a452f7e317f567cf834897520f4e7b
--- /dev/null
+++ b/LayoutTests/fast/forms/color/input-color-choose-default-value-after-set-value.html
@@ -0,0 +1,27 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../../../fast/js/resources/js-test-pre.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.');
+
+var input = document.getElementById('input');
+
+input.onchange = function() {
+ debug("onchange fired: " + input.value);
+};
+
+clickElement(input);
+input.value = '#ff0000';
+shouldBe('input.value', '"#ff0000"');
+internals.selectColorInColorChooser(input, '#ffffff');
+shouldBe('input.value', '"#ffffff"');
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698