Bug 151898 - Modern IDB: Add some more custom exception messages, passing some more tests
Summary: Modern IDB: Add some more custom exception messages, passing some more tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: Safari 9
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Brady Eidson
URL:
Keywords:
Depends on:
Blocks: 149117 150882
  Show dependency treegraph
 
Reported: 2015-12-04 17:23 PST by Brady Eidson
Modified: 2015-12-04 21:25 PST (History)
4 users (show)

See Also:


Attachments
Patch v1 (15.63 KB, patch)
2015-12-04 17:24 PST, Brady Eidson
achristensen: review+
achristensen: commit-queue-
Details | Formatted Diff | Diff
Patch for landing (16.62 KB, patch)
2015-12-04 20:41 PST, Brady Eidson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brady Eidson 2015-12-04 17:23:11 PST
Modern IDB: Add some more custom exception messages, passing some more tests

Another batch.
Comment 1 Brady Eidson 2015-12-04 17:24:10 PST
Created attachment 266689 [details]
Patch v1
Comment 2 Alex Christensen 2015-12-04 17:31:03 PST
Comment on attachment 266689 [details]
Patch v1

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

r=me except one thing:

> LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt:163
> -PASS code is DOMException.INVALID_STATE_ERR
> -PASS ename is 'InvalidStateError'
> -Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction has finished.
> +FAIL code should be 11. Was 0.
> +FAIL ename should be InvalidStateError. Was TransactionInactiveError.

This is no good.  Either intentionally change the test because we are now conforming to a spec that has changed since this was written, or change the code to conform to the spec.  Don't change PASS to FAIL in an expectations.
Comment 3 Brady Eidson 2015-12-04 20:40:07 PST
(In reply to comment #2)
> Comment on attachment 266689 [details]
> Patch v1
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=266689&action=review
> 
> r=me except one thing:
> 
> > LayoutTests/storage/indexeddb/transaction-and-objectstore-calls-expected.txt:163
> > -PASS code is DOMException.INVALID_STATE_ERR
> > -PASS ename is 'InvalidStateError'
> > -Exception message: Failed to execute 'index' on 'IDBObjectStore': The transaction has finished.
> > +FAIL code should be 11. Was 0.
> > +FAIL ename should be InvalidStateError. Was TransactionInactiveError.
> 
> This is no good.  Either intentionally change the test because we are now
> conforming to a spec that has changed since this was written, or change the
> code to conform to the spec.  Don't change PASS to FAIL in an expectations.

Yup yikes, good call. Thanks.
Comment 4 Brady Eidson 2015-12-04 20:41:30 PST
Created attachment 266700 [details]
Patch for landing
Comment 5 WebKit Commit Bot 2015-12-04 21:25:28 PST
Comment on attachment 266700 [details]
Patch for landing

Clearing flags on attachment: 266700

Committed r193510: <http://trac.webkit.org/changeset/193510>
Comment 6 WebKit Commit Bot 2015-12-04 21:25:31 PST
All reviewed patches have been landed.  Closing bug.