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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/forms/image/input-image-submit.html

Issue 2100243002: Remove non-standardize key code names from event_sender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix inspector tests that were missed by sed Created 4 years, 5 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 </head> 5 </head>
6 <body onload="startTests()"> 6 <body onload="startTests()">
7 7
8 <form action="input-image-submit.html" method=GET id=form> 8 <form action="input-image-submit.html" method=GET id=form>
9 <input type=hidden name=state id=state value=step1> 9 <input type=hidden name=state id=state value=step1>
10 <input type=image name=image id=image src="../resources/apple.gif" value=value> 10 <input type=image name=image id=image src="../resources/apple.gif" value=value>
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 // Should have only image=value. 99 // Should have only image=value.
100 if (query.indexOf('image=value') == -1) { 100 if (query.indexOf('image=value') == -1) {
101 failAndDone('Changing to text on submit failed: ' + query); 101 failAndDone('Changing to text on submit failed: ' + query);
102 return; 102 return;
103 } 103 }
104 104
105 // Step 3: Change the type to image on 'submit' event 105 // Step 3: Change the type to image on 'submit' event
106 state.value = 'to-image-on-submit'; 106 state.value = 'to-image-on-submit';
107 image.type = 'text'; 107 image.type = 'text';
108 image.focus(); 108 image.focus();
109 eventSender.keyDown('\n'); 109 eventSender.keyDown('Enter');
110 } else if (query.indexOf('state=to-image-on-submit') != -1) { 110 } else if (query.indexOf('state=to-image-on-submit') != -1) {
111 // Should have image.x and image.y, but their values are 0. 111 // Should have image.x and image.y, but their values are 0.
112 if (query.indexOf('image.x=0&image.y=0&image=value') == -1) { 112 if (query.indexOf('image.x=0&image.y=0&image=value') == -1) {
113 failAndDone('Changing to image on submit failed: ' + query); 113 failAndDone('Changing to image on submit failed: ' + query);
114 return; 114 return;
115 } 115 }
116 116
117 // Step 4: Change the type to image on 'click' event 117 // Step 4: Change the type to image on 'click' event
118 state.value = 'to-image-on-click'; 118 state.value = 'to-image-on-click';
119 image.type = 'text'; 119 image.type = 'text';
(...skipping 14 matching lines...) Expand all
134 testFailed('Removing the input on submit failed: ' + query); 134 testFailed('Removing the input on submit failed: ' + query);
135 else 135 else
136 testPassed('All tests passed.'); 136 testPassed('All tests passed.');
137 notifyDone(); 137 notifyDone();
138 } 138 }
139 } 139 }
140 </script> 140 </script>
141 </body> 141 </body>
142 </html> 142 </html>
143 143
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698