Bug 36038 - Add more test cases for Blob.slice
Summary: Add more test cases for Blob.slice
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jian Li
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-11 15:55 PST by Jian Li
Modified: 2010-03-11 18:17 PST (History)
2 users (show)

See Also:


Attachments
Proposed Patch (10.84 KB, patch)
2010-03-11 15:57 PST, Jian Li
dimich: review+
jianli: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jian Li 2010-03-11 15:55:10 PST
Need to add more test cases for Blob.slice, including empty file and big file.
Comment 1 Jian Li 2010-03-11 15:57:37 PST
Created attachment 50554 [details]
Proposed Patch
Comment 2 Dmitry Titov 2010-03-11 17:19:31 PST
Comment on attachment 50554 [details]
Proposed Patch

r=me with a nit:

> diff --git a/LayoutTests/http/tests/local/resources/send-sliced-dragged-file.js b/LayoutTests/http/tests/local/resources/send-sliced-dragged-file.js

>  function runTest()
> +
> +    debug("Test slicing and sending a small file.");
> +    dragAndSliceStableFile("resources/file-for-drag-to-send.txt", 10, 2, 4);
> +    dragAndSliceStableFile("resources/file-for-drag-to-send.txt", 10, 2, 20);
> +    dragAndSliceStableFile("resources/file-for-drag-to-send.txt", 10, 15, 20);
> +
> +    debug("Test slicing and sending a big file.");
> +    dragAndSliceStableFile("resources/abe.png", 12242, 10, 40);
> +    dragAndSliceStableFile("resources/abe.png", 12242, 10, 3000);
> +    dragAndSliceStableFile("resources/abe.png", 12242, 3000, 15000);

It would be nice to add info on why this file size is enough... Also, enough for what? I think you are trying to hit the codepath where some buffer is getting full, it's good to mention it.
Comment 3 Jian Li 2010-03-11 18:17:01 PST
Committed as http://trac.webkit.org/changeset/55873.