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

Side by Side Diff: LayoutTests/fast/forms/file/file-reset-in-change.html

Issue 148983008: Reduce test code duplication in fast/forms/file (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 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 <script src="resources/file-drag-common.js"></script>
2 <body> 3 <body>
3 <p>Resetting a file upload control by script should clear the icon.</p> 4 <p>Resetting a file upload control by script should clear the icon.</p>
4 <p>Manual test: Select a file for the file upload control, and confirm it has no icon.</p> 5 <p>Manual test: Select a file for the file upload control, and confirm it has no icon.</p>
5 <input id=file1 type=file> 6 <input id=file1 type=file>
6 </form> 7 </form>
7 <script> 8 <script>
8 function dragFilesOntoElement(element, files) {
9 eventSender.beginDragWithFiles(files);
10 var centerX = element.offsetLeft + element.offsetWidth / 2;
11 var centerY = element.offsetTop + element.offsetHeight / 2;
12 eventSender.mouseMoveTo(centerX, centerY);
13 eventSender.mouseUp();
14 }
15
16 function handleChange() { 9 function handleChange() {
17 file1.value = ''; 10 file1.value = '';
18 } 11 }
19 12
20 var file1 = document.getElementById('file1'); 13 var file1 = document.getElementById('file1');
21 file1.addEventListener('change', handleChange); 14 file1.addEventListener('change', handleChange);
22 dragFilesOntoElement(file1, ['foo.txt']); 15 dragFilesOntoElement(file1, ['foo.txt']);
23 </script> 16 </script>
24 </body> 17 </body>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/file/file-input-reset-validation.html ('k') | LayoutTests/fast/forms/file/input-file-value.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698