Bug 25852

Summary: No way to test multi-file drags in DumpRenderTree
Product: WebKit Reporter: Eric Seidel (no email) <eric>
Component: New BugsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Bug Depends on:    
Bug Blocks: 25862, 25879, 25909, 25924    
Attachments:
Description Flags
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles
none
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles
none
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles
none
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles
none
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles oliver: review+

Description Eric Seidel (no email) 2009-05-18 03:59:36 PDT
No way to test file drags in DumpRenderTree

Which means we can't test <input type="file"> dragging.  I'm going to take a moment tomorrow and look at adding such.  Maybe something like:

eventSender.beginFileDrag("foo.png");
eventSender.mouseMoveTo(10, 10);
eventSender.mouseUp();

We could even use this for testing the "hover" effect on <input type="file"> by causing the pixel dump to occur before the actual mouseUp().
Comment 1 Eric Seidel (no email) 2009-05-18 04:13:28 PDT
Oh, turns out we already have layoutTestController.addFileToPasteboardOnDrag()

Not quite everything I want, but it's a start.
Comment 2 Eric Seidel (no email) 2009-05-18 23:54:56 PDT
Created attachment 30458 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

 14 files changed, 206 insertions(+), 85 deletions(-)
Comment 3 Eric Seidel (no email) 2009-05-18 23:55:27 PDT
Oops,  I forgot to mention in the changeLog that I sorted the selectors in a couple functions.  I'll update my local copy of the ChangeLog to say so.
Comment 4 Eric Seidel (no email) 2009-05-18 23:57:56 PDT
Comment on attachment 30458 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

I'll post an updated patch.
Comment 5 Eric Seidel (no email) 2009-05-18 23:58:13 PDT
Created attachment 30459 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

 14 files changed, 225 insertions(+), 85 deletions(-)
Comment 6 Eric Seidel (no email) 2009-05-19 00:14:52 PDT
Created attachment 30460 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

 14 files changed, 210 insertions(+), 87 deletions(-)
Comment 7 Eric Seidel (no email) 2009-05-19 17:37:27 PDT
Created attachment 30487 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

 23 files changed, 389 insertions(+), 164 deletions(-)
Comment 8 Eric Seidel (no email) 2009-05-19 17:38:15 PDT
Comment on attachment 30460 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

Sadly this patch was still in the queue this morning, so I decided to fix bug 25862 as well.  I've uploaded a new (slightly larger, but much much cooler) patch!
Comment 9 Eric Seidel (no email) 2009-05-19 18:50:26 PDT
Created attachment 30488 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

 23 files changed, 419 insertions(+), 164 deletions(-)
Comment 10 Oliver Hunt 2009-05-19 23:18:06 PDT
Comment on attachment 30488 [details]
Remove layoutTestController.addFileToPasteboardOnDrag and add eventSender.beginDragWithFiles

r=me
Comment 11 Eric Seidel (no email) 2009-05-20 00:32:49 PDT
YAY!

Committing to http://svn.webkit.org/repository/webkit/trunk ...
	D	LayoutTests/fast/forms/dragging-to-disabled-file-input-expected.txt
	D	LayoutTests/fast/forms/dragging-to-disabled-file-input.html
	D	LayoutTests/fast/forms/dragging-to-file-input-expected.txt
	D	LayoutTests/fast/forms/dragging-to-file-input.html
	M	LayoutTests/ChangeLog
	A	LayoutTests/editing/pasteboard/file-input-files-access-expected.txt
	A	LayoutTests/editing/pasteboard/file-input-files-access.html
	A	LayoutTests/editing/pasteboard/resources/File With Spaces! For Drägging?.gif
	A	LayoutTests/editing/pasteboard/resources/apple.gif
	A	LayoutTests/editing/pasteboard/resources/file-input-files-access.js
	A	LayoutTests/editing/pasteboard/resources/mozilla.gif
	M	LayoutTests/platform/gtk/Skipped
	M	LayoutTests/platform/qt/Skipped
	M	LayoutTests/platform/win/Skipped
	M	WebKitTools/ChangeLog
	M	WebKitTools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
	A	WebKitTools/DumpRenderTree/DumpRenderTreeFileDraggingSource.h
	A	WebKitTools/DumpRenderTree/DumpRenderTreeFileDraggingSource.m
	M	WebKitTools/DumpRenderTree/LayoutTestController.cpp
	M	WebKitTools/DumpRenderTree/LayoutTestController.h
	M	WebKitTools/DumpRenderTree/mac/DumpRenderTree.mm
	M	WebKitTools/DumpRenderTree/mac/EventSendingController.mm
	M	WebKitTools/DumpRenderTree/mac/UIDelegate.mm
Committed r43890