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

Side by Side Diff: LayoutTests/fast/forms/suggestion-picker/date-suggestion-picker-step-attribute.html

Issue 484353004: Test tidying: use "escape" and "backspace" with eventSender.keyDown() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: More quoting consistency wibbles Created 6 years, 4 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../../resources/js-test.js"></script> 4 <script src="../../../resources/js-test.js"></script>
5 <script src="../../forms/resources/picker-common.js"></script> 5 <script src="../../forms/resources/picker-common.js"></script>
6 <script src="resources/suggestion-picker-common.js"></script> 6 <script src="resources/suggestion-picker-common.js"></script>
7 </head> 7 </head>
8 <body style="background-color: #bbbbbb;"> 8 <body style="background-color: #bbbbbb;">
9 <p id="description"></p> 9 <p id="description"></p>
10 <div id="console"></div> 10 <div id="console"></div>
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 shouldBe('entryValues().length', '7'); 45 shouldBe('entryValues().length', '7');
46 shouldBeEqualToString('entryValues()[0]', '2012-01-21'); 46 shouldBeEqualToString('entryValues()[0]', '2012-01-21');
47 shouldBeEqualToString('entryValues()[1]', '2012-01-23'); 47 shouldBeEqualToString('entryValues()[1]', '2012-01-23');
48 shouldBeEqualToString('entryValues()[2]', '2012-01-25'); 48 shouldBeEqualToString('entryValues()[2]', '2012-01-25');
49 shouldBeEqualToString('entryValues()[3]', '2012-01-27'); 49 shouldBeEqualToString('entryValues()[3]', '2012-01-27');
50 shouldBeEqualToString('entryValues()[4]', '2012-01-29'); 50 shouldBeEqualToString('entryValues()[4]', '2012-01-29');
51 shouldBeEqualToString('entryValues()[5]', '2012-01-31'); 51 shouldBeEqualToString('entryValues()[5]', '2012-01-31');
52 shouldBeEqualToString('entryValues()[6]', '@openCalendarPicker'); 52 shouldBeEqualToString('entryValues()[6]', '@openCalendarPicker');
53 53
54 eventSender.keyDown('\x1B'); // Close picker. 54 eventSender.keyDown('escape'); // Close picker.
55 waitUntilClosing(test1AfterClosing); 55 waitUntilClosing(test1AfterClosing);
56 } 56 }
57 57
58 function test1AfterClosing() { 58 function test1AfterClosing() {
59 dateElement.step = 5; 59 dateElement.step = 5;
60 openPicker(dateElement, test2); 60 openPicker(dateElement, test2);
61 } 61 }
62 62
63 function test2() { 63 function test2() {
64 popupWindow.focus(); 64 popupWindow.focus();
65 65
66 shouldBe('entryValues().length', '4'); 66 shouldBe('entryValues().length', '4');
67 shouldBeEqualToString('entryValues()[0]', '2012-01-21'); 67 shouldBeEqualToString('entryValues()[0]', '2012-01-21');
68 shouldBeEqualToString('entryValues()[1]', '2012-01-26'); 68 shouldBeEqualToString('entryValues()[1]', '2012-01-26');
69 shouldBeEqualToString('entryValues()[2]', '2012-01-31'); 69 shouldBeEqualToString('entryValues()[2]', '2012-01-31');
70 shouldBeEqualToString('entryValues()[3]', '@openCalendarPicker'); 70 shouldBeEqualToString('entryValues()[3]', '@openCalendarPicker');
71 71
72 eventSender.keyDown('\x1B'); // Close picker. 72 eventSender.keyDown('escape'); // Close picker.
73 waitUntilClosing(test2AfterClosing); 73 waitUntilClosing(test2AfterClosing);
74 } 74 }
75 75
76 function test2AfterClosing() { 76 function test2AfterClosing() {
77 dateElement.step = 30; 77 dateElement.step = 30;
78 openPicker(dateElement, test3); 78 openPicker(dateElement, test3);
79 } 79 }
80 80
81 function test3() { 81 function test3() {
82 popupWindow.focus(); 82 popupWindow.focus();
83 83
84 shouldBe('entryValues().length', '2'); 84 shouldBe('entryValues().length', '2');
85 shouldBeEqualToString('entryValues()[0]', '2012-01-31'); 85 shouldBeEqualToString('entryValues()[0]', '2012-01-31');
86 shouldBeEqualToString('entryValues()[1]', '@openCalendarPicker'); 86 shouldBeEqualToString('entryValues()[1]', '@openCalendarPicker');
87 87
88 finishJSTest(); 88 finishJSTest();
89 } 89 }
90 90
91 </script> 91 </script>
92 </body> 92 </body>
93 </html> 93 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698