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

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

Issue 16951003: Fix broken AttachContext from r152289 (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed failing test (/fast/forms/file/input-file-re-render.html) Created 7 years, 6 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 <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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698