OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <script src="../../../resources/js-test.js"></script> | |
4 <style> | |
5 input:focus { | |
6 background: blue; | |
7 } | |
8 </style> | |
9 <body> | |
10 <input id="test" type="date"> | |
11 <a></a> | |
12 <script> | |
13 description('Setting value onBlur, should not keep element in focus.'); | |
14 var testInput = document.getElementById('test'); | |
15 testInput.addEventListener('blur', function() { | |
16 testInput.value=""; | |
tkent
2014/03/31 04:17:08
nit: Needs spaces around '='
Habib Virji
2014/03/31 09:05:51
Done.
| |
17 }); | |
18 | |
19 testInput.value = "2012-02-01"; | |
20 testInput.focus(); | |
21 var style = window.getComputedStyle(testInput); | |
22 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.
| |
23 testInput.blur(); | |
24 style = window.getComputedStyle(testInput); | |
25 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.
| |
26 </script> | |
27 </body> | |
28 </html> | |
OLD | NEW |