Bug 88099 - [chromium] DumpRenderTree will crash if there is not arguments in beginDragWithFiles
Summary: [chromium] DumpRenderTree will crash if there is not arguments in beginDragWi...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-01 08:40 PDT by Li Yin
Modified: 2012-06-19 00:55 PDT (History)
7 users (show)

See Also:


Attachments
Patch (1.70 KB, patch)
2012-06-01 09:04 PDT, Li Yin
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Li Yin 2012-06-01 08:40:05 PDT
If there is not argument in function beginDragWithFiles, DumpRenderTree will crash.
Comment 1 Li Yin 2012-06-01 09:04:56 PDT
Created attachment 145322 [details]
Patch
Comment 2 Li Yin 2012-06-01 09:14:04 PDT
Gtk DumpRenderTree can work correctly if there is not arguments in the function beginDragWithFiles.
Comment 3 Kent Tamura 2012-06-03 18:03:06 PDT
(In reply to comment #0)
> If there is not argument in function beginDragWithFiles, DumpRenderTree will crash.

Why do we need to support such case?  A test using beginDragWithFiles must specify arguments.
Comment 4 Li Yin 2012-06-03 18:18:58 PDT
(In reply to comment #3)
> (In reply to comment #0)
> > If there is not argument in function beginDragWithFiles, DumpRenderTree will crash.
> 
> Why do we need to support such case?  A test using beginDragWithFiles must specify arguments.

In fast/files/file-list-test.html, if some files are selected, the onInputFileChange can be called, we can test the attribute length and items of FileList.
In addition, we want to cover the scenario that no file is selected. If we use [] as the argument, if is fine. But for the robustness, I think it should support no argument, as GTK test shell does.

https://bugs.webkit.org/show_bug.cgi?id=87696#c14
Comment 5 Kent Tamura 2012-06-03 22:39:18 PDT
(In reply to comment #4)
> (In reply to comment #3)
> > (In reply to comment #0)
> > > If there is not argument in function beginDragWithFiles, DumpRenderTree will crash.
> > 
> > Why do we need to support such case?  A test using beginDragWithFiles must specify arguments.
> 
> In fast/files/file-list-test.html, if some files are selected, the onInputFileChange can be called, we can test the attribute length and items of FileList.
> In addition, we want to cover the scenario that no file is selected. If we use [] as the argument, if is fine. But for the robustness, I think it should support no argument, as GTK test shell does.
> 
> https://bugs.webkit.org/show_bug.cgi?id=87696#c14

We can use just <input type=file> without selected files to test empty FileList.
Do you think real browsers need to handle drag with empty file list? If not, beginDragWithFiles should reject empty file list and missing file list instead of accepting them.
Comment 6 Li Yin 2012-06-05 21:24:29 PDT
(In reply to comment #5)
> We can use just <input type=file> without selected files to test empty FileList.
> Do you think real browsers need to handle drag with empty file list? If not, beginDragWithFiles should reject empty file list and missing file list instead of accepting them.

Okay, thanks for your interpretation, it looks reasonable.
Mark this bug to be Invalid.