Closed Bug 974319 Opened 6 years ago Closed 6 years ago
Mock DOMRequest and get rid of some set
Timeout() in unit tests
46 bytes, text/x-github-pull-request
|Details | Review|
+++ 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.
Status: NEW → ASSIGNED
Comment on attachment 8395547 [details] [review] Github: https://github.com/mozilla-b2g/gaia/pull/17507 r+ with nit
Attachment #8395547 - Flags: review?(alive) → review+
Status: ASSIGNED → RESOLVED
Closed: 6 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.
You need to log in before you can comment on or make changes to this bug.