| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <body> | 3 <body> |
| 4 <form> | 4 <form> |
| 5 <input type="file" name="file" multiple id="file"> | 5 <input type="file" name="file" multiple id="file"> |
| 6 </form> | 6 </form> |
| 7 <p>The file upload control above should have text '2 files,' not a filename.</p> | 7 <p>The file upload control above should have text '2 files,' not a filename.</p> |
| 8 | 8 |
| 9 <script> | 9 <script> |
| 10 function startTest() | 10 function startTest() |
| 11 { | 11 { |
| 12 var input = document.getElementById('file'); | 12 var input = document.getElementById('file'); |
| 13 | 13 |
| 14 // Drop 2 files to the control. | 14 // Drop 2 files to the control. |
| 15 eventSender.beginDragWithFiles(['input-file-re-render.html', 'script-tests/T
EMPLATE.html']); | 15 eventSender.beginDragWithFiles(['input-file-re-render.html', 'script-tests/T
EMPLATE.html']); |
| 16 eventSender.mouseMoveTo(10, 10); | 16 eventSender.mouseMoveTo(10, 10); |
| 17 eventSender.mouseUp(); | 17 eventSender.mouseUp(); |
| 18 | 18 |
| 19 // Move the mouse away before moving on. This is done because landing the pa
tch for bug 249328 |
| 20 // would cause this test to fail. That patch fixes a hover problem which cau
ses this test |
| 21 // to actually perform correctly (after switching back to display: inline-bl
ock, the style of |
| 22 // the file control would be 'hovered', since it's under the mouse). However
, the 'expected' |
| 23 // PNG files were created when this was not working properly, and the contro
l is in its un-hovered state. |
| 24 eventSender.mouseMoveTo(300, 300); |
| 25 |
| 19 // Delete the renderer. | 26 // Delete the renderer. |
| 20 input.style.display = 'none'; | 27 input.style.display = 'none'; |
| 21 input.offsetWidth; // Force to do layout | 28 input.offsetWidth; // Force to do layout |
| 22 | 29 |
| 23 // Attach a renderer again. | 30 // Attach a renderer again. |
| 24 input.style.display = 'inline-block'; | 31 input.style.display = 'inline-block'; |
| 25 | 32 |
| 26 testRunner.notifyDone(); | 33 testRunner.notifyDone(); |
| 27 } | 34 } |
| 28 | 35 |
| 29 if (window.eventSender) { | 36 if (window.eventSender) { |
| 30 window.onload = startTest; | 37 window.onload = startTest; |
| 31 testRunner.waitUntilDone(); | 38 testRunner.waitUntilDone(); |
| 32 } | 39 } |
| 33 </script> | 40 </script> |
| 34 </body> | 41 </body> |
| 35 </html> | 42 </html> |
| OLD | NEW |