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

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

Issue 15508003: Revert "Don't force layout for mouse event hit tests" (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
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
17 // Drop 2 files to the control. 14 // Drop 2 files to the control.
18 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']);
19 eventSender.mouseMoveTo(10, 10); 16 eventSender.mouseMoveTo(10, 10);
20 eventSender.mouseUp(); 17 eventSender.mouseUp();
21 18
22 // Delete the renderer. 19 // Delete the renderer.
23 input.style.display = 'none'; 20 input.style.display = 'none';
24 input.offsetWidth; // Force to do layout 21 input.offsetWidth; // Force to do layout
25 22
26 // Attach a renderer again. 23 // Attach a renderer again.
27 input.style.display = 'inline-block'; 24 input.style.display = 'inline-block';
28 25
29 testRunner.notifyDone(); 26 testRunner.notifyDone();
30 } 27 }
31 28
32 if (window.eventSender) { 29 if (window.eventSender) {
33 window.onload = startTest; 30 window.onload = startTest;
34 testRunner.waitUntilDone(); 31 testRunner.waitUntilDone();
35 } 32 }
36 </script> 33 </script>
37 </body> 34 </body>
38 </html> 35 </html>
OLDNEW
« no previous file with comments | « LayoutTests/fast/forms/file/get-file-upload.html ('k') | LayoutTests/fast/forms/input-appearance-preventDefault.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698