Bug 48067

Summary: Add IndexedDB test/tutorial
Product: WebKit Reporter: Jeremy Orlow <jorlow>
Component: New BugsAssignee: Jeremy Orlow <jorlow>
Status: RESOLVED FIXED    
Severity: Normal CC: andreip, steveblock
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: OS X 10.5   
Bug Depends on: 48266    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch none

Description Jeremy Orlow 2010-10-21 07:39:12 PDT
Add IndexedDB test/tutorial
Comment 1 Jeremy Orlow 2010-10-21 07:43:31 PDT
Created attachment 71435 [details]
Patch
Comment 2 Jeremy Orlow 2010-10-21 07:45:16 PDT
please review
Comment 3 Steve Block 2010-10-21 08:56:49 PDT
Comment on attachment 71435 [details]
Patch

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

> LayoutTests/ChangeLog:11
> +        useful to run in case there are additional code paths missed by the normal tests.

Not sure the lines above are relevant

> LayoutTests/storage/indexeddb/tutorial.html:21
> +// This is not a particularly good layout test, but it does have a good amount of coverage

Why isn't it a good layout test?

> LayoutTests/storage/indexeddb/tutorial.html:22
> +// and serves as a living document describing what's expected to work and how within WebKit.

Why not make the above comment part of the HTML output?

> LayoutTests/storage/indexeddb/tutorial.html:193
> +    // parameters are optional for transaction.

transactions

> LayoutTests/storage/indexeddb/tutorial.html:335
> +        cursorComplete(event.source); // The soruce is still an objectStore.

source

> LayoutTests/storage/indexeddb/tutorial.html:423
> +// to disk can be serialized for postMessage.

I wonder if all of the comments, here, particularly this one, should be part of the HTML output. It would be great if the output from this test were all of the descriptive text you've written, interspersed with the commands being run.
Comment 4 Jeremy Orlow 2010-10-21 09:16:58 PDT
Comment on attachment 71435 [details]
Patch

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

>> LayoutTests/ChangeLog:11
>> +        useful to run in case there are additional code paths missed by the normal tests.
> 
> Not sure the lines above are relevant

removed

>> LayoutTests/storage/indexeddb/tutorial.html:21
>> +// This is not a particularly good layout test, but it does have a good amount of coverage
> 
> Why isn't it a good layout test?

// This is not an ideal layout test since it doesn't verify things as thoroughly as it could,
// but adding such content would make it much more cluttered and thus wouldn't serve its primary
// goal of teaching people IndexedDB. That said, it does have a good amount of coverage and
// serves as a living document describing what's expected to work and how within WebKit so it
// seems well worth having checked in.

>> LayoutTests/storage/indexeddb/tutorial.html:22
>> +// and serves as a living document describing what's expected to work and how within WebKit.
> 
> Why not make the above comment part of the HTML output?

I started to do this across the whole document, but it makes the source code much less readable and hackable.  I added a comment to the bottom telling people to look at the source.

>> LayoutTests/storage/indexeddb/tutorial.html:193
>> +    // parameters are optional for transaction.
> 
> transactions

done

>> LayoutTests/storage/indexeddb/tutorial.html:335
>> +        cursorComplete(event.source); // The soruce is still an objectStore.
> 
> source

done

>> LayoutTests/storage/indexeddb/tutorial.html:423
>> +// to disk can be serialized for postMessage.
> 
> I wonder if all of the comments, here, particularly this one, should be part of the HTML output. It would be great if the output from this test were all of the descriptive text you've written, interspersed with the commands being run.

See above comment.
Comment 5 Jeremy Orlow 2010-10-21 09:24:25 PDT
Created attachment 71446 [details]
Patch
Comment 6 Steve Block 2010-10-26 06:38:30 PDT
Comment on attachment 71446 [details]
Patch

r=me
Comment 7 Jeremy Orlow 2010-10-26 08:19:28 PDT
Comment on attachment 71446 [details]
Patch

Clearing flags on attachment: 71446

Committed r70521: <http://trac.webkit.org/changeset/70521>
Comment 8 Jeremy Orlow 2010-10-26 08:19:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Jeremy Orlow 2010-10-26 08:48:12 PDT
Oops, this needs to be landed after https://bugs.webkit.org/show_bug.cgi?id=48266

steve, can you please re r+ this?
Comment 10 Jeremy Orlow 2010-10-27 03:30:02 PDT
Committed r70632: <http://trac.webkit.org/changeset/70632>
Comment 11 Jeremy Orlow 2010-10-29 09:37:37 PDT
Committed r70887: <http://trac.webkit.org/changeset/70887>