Closed Bug 1220579 Opened 9 years ago Closed 9 years ago

Add unit tests to make sure home screen handles DataCloneError when storing to idb

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: cwiiis, Assigned: cwiiis)

References

Details

Attachments

(1 file)

Although I have no idea exactly how to get into a state that reproduces this error, it's possible for records in the history datastore to cause a DataCloneError when you try to put them in an indexeddb.

This is fixed in bug 1220379, but without unit tests for expediency - we should have tests for this.
Why not just stub the idb methods to throw in the unit test? At least we make sure that this can happen and the homescreen will still work.
Attachment #8682490 - Flags: review?(gmarty)
Comment on attachment 8682490 [details] [review]
[gaia] Cwiiis:bug1220579-homescreen-datastore-exception-tests > mozilla-b2g:master

That's perfect. Thanks!
Attachment #8682490 - Flags: review?(gmarty) → review+
Merged: https://github.com/mozilla-b2g/gaia/commit/8ed0cf353710e3ff68a193172f59bbd3250bf3ca
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: