Bug 27778 - Add more DOM Storage tests
Summary: Add more DOM Storage tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Jeremy Orlow
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-28 13:33 PDT by Jeremy Orlow
Modified: 2009-07-31 13:29 PDT (History)
3 users (show)

See Also:


Attachments
v1 (14.06 KB, patch)
2009-07-28 13:35 PDT, Jeremy Orlow
abarth: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Orlow 2009-07-28 13:33:31 PDT
Add more tests.
Comment 1 Jeremy Orlow 2009-07-28 13:35:37 PDT
Created attachment 33667 [details]
v1

Add more localStorage tests.  As with before, once I know everything's OK with them, I'll port them over to SessionStorage tests as well.

       These test behavior that I don't think was very well verified earlier.

        * storage/domstorage/localstorage/complex-keys-expected.txt: Added.
        * storage/domstorage/localstorage/complex-keys.html: Added.
              A bunch of corner cases related to keys.
        * storage/domstorage/localstorage/complex-values-expected.txt: Added.
        * storage/domstorage/localstorage/complex-values.html: Added.
              A bunch of corner cases related to values.
        * storage/domstorage/localstorage/remove-item-expected.txt: Added.
        * storage/domstorage/localstorage/remove-item.html: Added.
              Test basic removeItem functionality.
Comment 2 Jeremy Orlow 2009-07-31 12:31:32 PDT
It'd be great if someone could look at this.
Comment 3 Adam Barth 2009-07-31 12:36:39 PDT
Comment on attachment 33667 [details]
v1

I support all non-flaky tests.  :)
Comment 4 David Levin 2009-07-31 12:41:46 PDT
Adam gave you an r+ but I think the tests should be fixed in the following manner:

I noticed that the test don't tell me anything so that I know if they've passed or not when I run them in a browser.

Typically each (sub) test case prints "PASS" when it passes or "FAIL" if it doesn't (both of which would be followed by the type of information you print out currently).

Also at the end of all testing in a layout test, it prints done.

There should usually be a message at the top of the test that indicates this is what will happen. ( blah blah blah. This test should print PASS a number of times followed by DONE)

Lastly, there is a little test framework that helps you with this and work really well for you since you don't need any particular tags.  (See the "how to" tab in https://spreadsheets.google.com/ccc?key=0Ap59kAXVHrP7cGlHa1VVTUxXLVBOVXp1aFRDem00TlE&hl=en).
Comment 5 Jeremy Orlow 2009-07-31 12:55:34 PDT
I talked to Dave about this.  None of the other DOM Storage tests currently do this and it'll require a fair amount of work to convert all of these tests, so I'm going commit this as is and create a bug against myself to some cleanup passes on all the tests there in the near future.
Comment 6 Jeremy Orlow 2009-07-31 13:29:55 PDT
Sending        LayoutTests/ChangeLog
Adding         LayoutTests/storage/domstorage/localstorage/complex-keys-expected.txt
Adding         LayoutTests/storage/domstorage/localstorage/complex-keys.html
Adding         LayoutTests/storage/domstorage/localstorage/complex-values-expected.txt
Adding         LayoutTests/storage/domstorage/localstorage/complex-values.html
Adding         LayoutTests/storage/domstorage/localstorage/remove-item-expected.txt
Adding         LayoutTests/storage/domstorage/localstorage/remove-item.html
Transmitting file data .......
Committed revision 46639.
http://trac.webkit.org/changeset/46639