Bug 77805

Summary: Port some indexeddb layout tests to workers.
Product: WebKit Reporter: David Grogan <dgrogan>
Component: New BugsAssignee: David Grogan <dgrogan>
Status: RESOLVED FIXED    
Severity: Normal CC: jsbell, tony, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description David Grogan 2012-02-03 21:20:10 PST
port some idb layout tests to workers
Comment 1 David Grogan 2012-02-03 21:20:28 PST
Created attachment 125477 [details]
Patch
Comment 2 David Grogan 2012-02-06 11:58:54 PST
Created attachment 125681 [details]
Patch
Comment 3 David Grogan 2012-02-06 12:03:24 PST
Comment on attachment 125681 [details]
Patch

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

Josh, do you know what's going on with DOMException here?

> LayoutTests/storage/indexeddb/objectstore-basics-expected.txt:84
> +PASS code is 25

DOMException.DATA_CLONE_ERR is the only problem I've run into so far - JS from workers thinks it is undefined.

> LayoutTests/storage/indexeddb/objectstore-basics-workers-expected.txt:85
> +FAIL [Worker] code should be 25 (of type number). Was undefined (of type undefined).

And undefined is propogated out anyway.
Comment 4 Joshua Bell 2012-02-06 13:11:48 PST
Comment on attachment 125681 [details]
Patch

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

> LayoutTests/storage/indexeddb/resources/objectstore-basics.js:168
> +        store.add({x: 'bar', y: document.getElementById('console')}, 'bar');

Discussed this offline, but for the record:

The "document" reference here will fail as undefined in workers. Since this is just trying to grab an object that can't be cloned, replace "document.getElementById('console')" with "self"

> LayoutTests/storage/indexeddb/resources/objectstore-basics.js:173
> +        shouldBe("code", "25");

... and DOMException itself will be undefined, so we probably need to leave this as 25. Add a FIXME indicating that when we move to DOM4-style exceptions this should look for the name "DataCloneError"
Comment 5 David Grogan 2012-02-06 13:57:34 PST
Created attachment 125703 [details]
Patch
Comment 6 David Grogan 2012-02-06 14:00:32 PST
Comment on attachment 125703 [details]
Patch

This patch fixes the non-cloneable test to use 'self' and the worker version now passes.
Comment 7 David Grogan 2012-02-06 14:47:55 PST
Created attachment 125712 [details]
Patch
Comment 8 David Grogan 2012-02-06 14:59:14 PST
Tony, could you review this patch?
Comment 9 David Grogan 2012-02-06 17:07:18 PST
*** Bug 73297 has been marked as a duplicate of this bug. ***
Comment 10 WebKit Review Bot 2012-02-06 17:39:29 PST
Comment on attachment 125712 [details]
Patch

Clearing flags on attachment: 125712

Committed r106886: <http://trac.webkit.org/changeset/106886>
Comment 11 WebKit Review Bot 2012-02-06 17:39:58 PST
All reviewed patches have been landed.  Closing bug.