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

Side by Side 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: SetFocus handler implementation for DateTimeFieldElement 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 unified diff | Download patch
OLDNEW
(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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698