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

Unified Diff: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved.html

Issue 191293011: Value set in onblur should not keep element in focus (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Code review updates Created 6 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved.html
diff --git a/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved.html b/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved.html
new file mode 100644
index 0000000000000000000000000000000000000000..d1f8654f6dbafe57326028b787a76a415dfbc4f1
--- /dev/null
+++ b/LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved.html
@@ -0,0 +1,28 @@
+<html>
+<head>
+<script src="../../../resources/js-test.js"></script>
+<style>
+input:focus {
+ background: blue;
+}
+</style>
+<body>
+<input id="test" type="date">
+<a></a>
+<script>
+description('Setting value onBlur, should not keep element in focus.');
+var testInput = document.getElementById('test');
+testInput.addEventListener('blur', function() {
+ testInput.value = '';
+});
+
+testInput.value = '2012-02-01';
+testInput.focus();
+var style = window.getComputedStyle(testInput);
+shouldBeEqualToString('style.getPropertyValue("background-color")', 'rgb(0, 0, 255)');
+testInput.blur();
+style = window.getComputedStyle(testInput);
+shouldBeEqualToString('style.getPropertyValue("background-color")', 'rgb(255, 255, 255)');
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-onblur-setvalue-onfocusremoved-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698