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

Side by Side Diff: LayoutTests/fast/forms/file/input-file-re-render.html

Issue 15494007: Also add forced layouts to a new test (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 // Mouse events only work after an initial layout
15 document.body.offsetLeft;
16
14 // Drop 2 files to the control. 17 // Drop 2 files to the control.
15 eventSender.beginDragWithFiles(['input-file-re-render.html', 'script-tests/T EMPLATE.html']); 18 eventSender.beginDragWithFiles(['input-file-re-render.html', 'script-tests/T EMPLATE.html']);
16 eventSender.mouseMoveTo(10, 10); 19 eventSender.mouseMoveTo(10, 10);
17 eventSender.mouseUp(); 20 eventSender.mouseUp();
18 21
19 // Delete the renderer. 22 // Delete the renderer.
20 input.style.display = 'none'; 23 input.style.display = 'none';
21 input.offsetWidth; // Force to do layout 24 input.offsetWidth; // Force to do layout
22 25
23 // Attach a renderer again. 26 // Attach a renderer again.
24 input.style.display = 'inline-block'; 27 input.style.display = 'inline-block';
25 28
26 testRunner.notifyDone(); 29 testRunner.notifyDone();
27 } 30 }
28 31
29 if (window.eventSender) { 32 if (window.eventSender) {
30 window.onload = startTest; 33 window.onload = startTest;
31 testRunner.waitUntilDone(); 34 testRunner.waitUntilDone();
32 } 35 }
33 </script> 36 </script>
34 </body> 37 </body>
35 </html> 38 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698