Bug 81043 - IndexedDB Tests: use self instead of window
Summary: IndexedDB Tests: use self instead of window
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: David Grogan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-13 15:21 PDT by David Grogan
Modified: 2012-03-15 19:55 PDT (History)
4 users (show)

See Also:


Attachments
Patch (147.70 KB, patch)
2012-03-13 15:22 PDT, David Grogan
no flags Details | Formatted Diff | Diff
Patch (166.19 KB, patch)
2012-03-13 15:41 PDT, David Grogan
no flags Details | Formatted Diff | Diff
Patch (166.19 KB, patch)
2012-03-13 15:47 PDT, David Grogan
no flags Details | Formatted Diff | Diff
Patch (168.33 KB, patch)
2012-03-14 16:00 PDT, David Grogan
no flags Details | Formatted Diff | Diff
Patch (168.38 KB, patch)
2012-03-14 22:08 PDT, David Grogan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Grogan 2012-03-13 15:21:17 PDT
IndexedDB Tests: use self instead of window
Comment 1 David Grogan 2012-03-13 15:22:12 PDT
Created attachment 131725 [details]
Patch
Comment 2 David Grogan 2012-03-13 15:41:30 PDT
Created attachment 131732 [details]
Patch
Comment 3 David Grogan 2012-03-13 15:47:15 PDT
Created attachment 131735 [details]
Patch
Comment 4 David Grogan 2012-03-13 15:54:16 PDT
Josh, could you take a look at this patch?  It is pipelined on top of the patch in bug 80664.

I think the only even somewhat interesting bits of this patch are in factory-deletedatabase-interactions.html and open-close-version.html where 'self' was already used to stash a copy of the 'this' pointer.  I changed it to 'that'.

Some of these tests use self.document and the like, which won't work in workers, but I'll change those when those tests actually start to run in workers.
Comment 5 Joshua Bell 2012-03-14 11:51:30 PDT
Comment on attachment 131735 [details]
Patch

LGTM - just notes below for other readers.

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

> LayoutTests/storage/indexeddb/createObjectStore-name-argument-required.html:18
> +    name = self.location.pathname;

Cool - I didn't know workers had |location|. :)

> LayoutTests/storage/indexeddb/factory-cmp.html:121
> +        "self.document",

As noted in dgrogan's comment, this will fail in workers. The intent of this is to exercise some invalid keys by using host objects. "self.document" could be changed to "self.location" and "self.document.body" with no loss of fidelity to the test, but this can wait for a followup patch.

> LayoutTests/storage/indexeddb/invalid-keys.html:-59
> -        "window.document", // HTMLDocument

Ditto.

> LayoutTests/storage/indexeddb/key-type-array.html:168
> +        "[ self.document ]",

Ditto.

> LayoutTests/storage/indexeddb/structured-clone.html:534
>      evalAndExpectException("store.put(document, 'key')", "DOMException.DATA_CLONE_ERR");

Ditto, although porting this test to workers will prove tricky due to Blob/File/FileList usage.
Comment 6 David Grogan 2012-03-14 16:00:09 PDT
Created attachment 131945 [details]
Patch
Comment 7 WebKit Review Bot 2012-03-14 19:41:29 PDT
Comment on attachment 131945 [details]
Patch

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

New failing tests:
storage/indexeddb/set_version_queue.html
Comment 8 David Grogan 2012-03-14 22:08:04 PDT
Created attachment 131985 [details]
Patch
Comment 9 David Grogan 2012-03-14 22:42:26 PDT
Tony, could you review this?
Comment 10 Tony Chang 2012-03-15 09:58:41 PDT
Comment on attachment 131985 [details]
Patch

rs=me
Comment 11 WebKit Review Bot 2012-03-15 19:55:13 PDT
Comment on attachment 131985 [details]
Patch

Clearing flags on attachment: 131985

Committed r110931: <http://trac.webkit.org/changeset/110931>
Comment 12 WebKit Review Bot 2012-03-15 19:55:19 PDT
All reviewed patches have been landed.  Closing bug.