Closed Bug 974319 Opened 11 years ago Closed 11 years ago

Mock DOMRequest and get rid of some setTimeout() in unit tests

Categories

(Firefox OS Graveyard :: Gaia, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timdream, Assigned: timdream)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #971546 +++ setTimeout() is proven to be lengthen and maybe unreliable for automation, we should replace them with Mock DOMRequest that is a little bit smarter.
With bug 971546 stuck in the bubble-tea branch in the coming weeks I cannot remove all setTimeout() DOMRequest usage without creating conflicts. Here is my WIP https://github.com/timdream/gaia/tree/mock-dom-request We could (A) land this first, create another bug to do the conversion after bubble-tea merges, or (B) we could keep the original scope of this bug and do it altogether. I prefer (B)....
So I fixed all the tests that rely on system/test/unit/mock_navigator_get_device_storage.js like what I intended to do when I was working on bug 971546. storage_watcher_test.js is fixed and it now runs much faster. An interesting thing I found is that bluetooth_transfer_test.js does not test any code patch that reaches the device storage API. I will file a bug to ask for a fix.
Attachment #8395547 - Flags: review?(alive)
Attachment #8395547 - Flags: feedback?(ferjmoreno)
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Comment on attachment 8395547 [details] [review] Github: https://github.com/mozilla-b2g/gaia/pull/17507 It seems that my input is not needed here anymore.
Attachment #8395547 - Flags: feedback?(ferjmoreno)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: