[IndexedDB-tests] IndexedDB support: Make fail() output clearer if request is still pending (#887)

If the `fail()` event listener is triggered due to an unexpected event, it peeks at `e.target.error` to see if that value would be a good thing to report. But if `e.target` is a request and the request's `readyState` is `'pending'`, accessing `.error` will throw, making `fail()` give unhelpful output.

So check `e.target.readyState` before accessing `e.target.error`

View on GitHub: https://github.com/w3c/web-platform-tests/pull/887

Received on Monday, 14 April 2014 16:27:38 UTC