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..9545bc97f3fac268f73f796b62ad5c57149cf660 |
--- /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=""; |
tkent
2014/03/31 04:17:08
nit: Needs spaces around '='
Habib Virji
2014/03/31 09:05:51
Done.
|
+}); |
+ |
+testInput.value = "2012-02-01"; |
+testInput.focus(); |
+var style = window.getComputedStyle(testInput); |
+shouldBe("style.getPropertyValue('background-color')", "'rgb(0, 0, 255)'"); |
tkent
2014/03/31 04:17:08
nit: Use shouldBeEqualToString
Habib Virji
2014/03/31 09:05:51
Done.
|
+testInput.blur(); |
+style = window.getComputedStyle(testInput); |
+shouldBe("style.getPropertyValue('background-color')", "'rgb(255, 255, 255)'"); |
tkent
2014/03/31 04:17:08
Ditto.
Habib Virji
2014/03/31 09:05:51
Done.
|
+</script> |
+</body> |
+</html> |