Bug 74897

Summary: IndexedDB: Add tests for structured clone data
Product: WebKit Reporter: Joshua Bell <jsbell>
Component: New BugsAssignee: Joshua Bell <jsbell>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, dgrogan, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 77239    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch
none
Patch for landing
none
Patch for landing none

Description Joshua Bell 2011-12-19 16:15:07 PST
IndexedDB: Add tests for structured clone data
Comment 1 Joshua Bell 2011-12-19 16:15:26 PST
Created attachment 119940 [details]
Patch
Comment 2 Joshua Bell 2011-12-19 16:15:37 PST
Comment on attachment 119940 [details]
Patch

WIP, no review yet
Comment 3 Joshua Bell 2011-12-19 17:20:47 PST
Created attachment 119957 [details]
Patch
Comment 4 Joshua Bell 2011-12-19 17:21:06 PST
Comment on attachment 119957 [details]
Patch

Added File test (name is lost) but still WIP
Comment 5 Joshua Bell 2012-01-06 17:27:28 PST
Created attachment 121525 [details]
Patch
Comment 6 Joshua Bell 2012-01-06 17:47:13 PST
Created attachment 121526 [details]
Patch
Comment 7 Joshua Bell 2012-01-06 17:49:38 PST
Tests only - review?

Note one FAIL in the expectations file - the V8 serialized cloning code doesn't distinguish 0 and -0. It should, but will require checking around to see where folks think the test should live (should -0 be considered a non-Integer, or should the SSV code special case it?)
Comment 8 WebKit Review Bot 2012-01-06 19:03:52 PST
Comment on attachment 121526 [details]
Patch

Attachment 121526 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11172177

New failing tests:
storage/indexeddb/structured-clone.html
Comment 9 Joshua Bell 2012-01-09 11:54:22 PST
Created attachment 121707 [details]
Patch
Comment 10 Joshua Bell 2012-01-09 11:56:08 PST
New patch. Removed some FIXMEs, clarified others with bug URL, removed debug lines that depended on a file modification time (duh) that would have caused failures.
Comment 11 WebKit Review Bot 2012-01-09 13:16:14 PST
Comment on attachment 121707 [details]
Patch

Attachment 121707 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11184652

New failing tests:
storage/indexeddb/structured-clone.html
Comment 12 Joshua Bell 2012-01-12 10:02:08 PST
No idea why this is failing - it passes when submitted to linux_layout try bot. May have to bisect the test. :P
Comment 13 Joshua Bell 2012-01-19 15:31:43 PST
Created attachment 123210 [details]
Patch
Comment 14 Joshua Bell 2012-01-19 15:33:25 PST
Marked test as failing (TEXT) in expectations. This should let it pass cr-linux (Chromium EWS). Per offline discussion, we can then land this harmlessly and determine what the text difference actually is since it doesn't repro locally or via the try bots.
Comment 15 David Grogan 2012-01-19 15:42:26 PST
Comment on attachment 123210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=123210&action=review

LGTM

I didn't go through this finely.

> LayoutTests/storage/indexeddb/structured-clone.html:16
> +if (window.eventSender) {

What's this?  When is it available and not available?
Comment 16 Joshua Bell 2012-01-19 15:49:04 PST
(In reply to comment #15)
> > LayoutTests/storage/indexeddb/structured-clone.html:16
> > +if (window.eventSender) {
> 
> What's this?  When is it available and not available?

It's used in other layout tests to synthesize drag & drop events (which is what I'm using it for here, to produce the data for File and FileList tests). I admit I just copied&pasted from other tests - it looks like it's provided by DumpRenderTree in Tools/DumpRenderTree/$PORT/EventSender.cpp
Comment 17 Joshua Bell 2012-01-20 11:50:02 PST
http://crbug.com/108012 reports a crash when storing File objects in the Chromium port. Possible that this is what we're seeing here.
Comment 18 Tony Chang 2012-01-20 17:37:21 PST
Comment on attachment 123210 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=123210&action=review

> LayoutTests/platform/chromium/test_expectations.txt:3921
> +BUGWK74897 : storage/indexeddb/structured-clone.html = TEXT

You may want to file a new bug to track this since landing this patch will close 74897.

>> LayoutTests/storage/indexeddb/structured-clone.html:16
>> +if (window.eventSender) {
> 
> What's this?  When is it available and not available?

It's like window.layoutTestController.  Checking it for existence is nice when loading in a regular browser rather than DumpRenderTree.

> LayoutTests/storage/indexeddb/structured-clone.html:23
> +    eventSender.beginDragWithFiles(['resources/test-data.html', 'resources/test-data.txt']);
> +    eventSender.mouseMoveTo(targetX, targetY);
> +    eventSender.mouseUp();

Nit: Can you add some text (maybe to the description) that says that this test requires DumpRenderTree?  Alternately you could write instructions on how to run the test from a browser.
Comment 19 Joshua Bell 2012-01-26 17:42:34 PST
Created attachment 124227 [details]
Patch
Comment 20 WebKit Review Bot 2012-01-26 18:49:27 PST
Comment on attachment 124227 [details]
Patch

Attachment 124227 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11350571

New failing tests:
storage/indexeddb/structured-clone.html
Comment 21 Joshua Bell 2012-01-27 08:57:02 PST
Yay, looks like it was other tests that failed cr-linux (Chromium EWS), not this one. I'll re-up the patch; not going to land until I get a green.
Comment 22 Joshua Bell 2012-01-27 12:19:37 PST
Created attachment 124348 [details]
Patch
Comment 23 Joshua Bell 2012-01-27 12:20:16 PST
Comment on attachment 124348 [details]
Patch

No changes, just running through cq prechecks again.
Comment 24 WebKit Review Bot 2012-01-27 12:56:02 PST
Comment on attachment 124348 [details]
Patch

Attachment 124348 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/11350838

New failing tests:
storage/indexeddb/structured-clone.html
Comment 25 Joshua Bell 2012-01-27 13:20:55 PST
Created attachment 124359 [details]
Patch
Comment 26 Joshua Bell 2012-01-27 17:29:03 PST
Okay, tony@ - for real this time?
Comment 27 WebKit Review Bot 2012-01-30 11:03:27 PST
Comment on attachment 124359 [details]
Patch

Rejecting attachment 124359 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
unk FAILED -- saving rejects to file LayoutTests/platform/chromium/test_expectations.txt.rej
patching file LayoutTests/storage/indexeddb/resources/test-data.html
patching file LayoutTests/storage/indexeddb/resources/test-data.txt
patching file LayoutTests/storage/indexeddb/structured-clone-expected.txt
patching file LayoutTests/storage/indexeddb/structured-clone.html

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force', u'--reviewer', u'Tony Chang']" exit_code: 1

Full output: http://queues.webkit.org/results/11371235
Comment 28 Joshua Bell 2012-01-30 11:48:06 PST
Created attachment 124574 [details]
Patch for landing
Comment 29 WebKit Review Bot 2012-01-30 11:53:43 PST
Comment on attachment 124574 [details]
Patch for landing

Rejecting attachment 124574 [details] from commit-queue.

Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2

Last 500 characters of output:
1 FAILED at 4038.
1 out of 1 hunk FAILED -- saving rejects to file LayoutTests/platform/chromium/test_expectations.txt.rej
patching file LayoutTests/storage/indexeddb/resources/test-data.html
patching file LayoutTests/storage/indexeddb/resources/test-data.txt
patching file LayoutTests/storage/indexeddb/structured-clone-expected.txt
patching file LayoutTests/storage/indexeddb/structured-clone.html

Failed to run "[u'/mnt/git/webkit-commit-queue/Tools/Scripts/svn-apply', u'--force']" exit_code: 1

Full output: http://queues.webkit.org/results/11368619
Comment 30 Joshua Bell 2012-01-30 12:09:25 PST
Created attachment 124579 [details]
Patch for landing
Comment 31 WebKit Review Bot 2012-01-30 13:07:42 PST
Comment on attachment 124579 [details]
Patch for landing

Clearing flags on attachment: 124579

Committed r106279: <http://trac.webkit.org/changeset/106279>
Comment 32 WebKit Review Bot 2012-01-30 13:07:49 PST
All reviewed patches have been landed.  Closing bug.