Closed Bug 840626 Opened 8 years ago Closed 8 years ago
_watch .html always times out (except apparently sometimes on Tinderbox?)
Steps to reproduce: make TEST_PATH=dom/devicestorage/test/ -C ../obj-firefox mochitest-plain Run the tests. Expected results: tests pass Actual results: dom/devicestorage/test/test_watch.html times out.
Hmm. This works if I run the tests from dom/devicestorage/ as opposed to dom/devicestorage/test Is this test somehow depending on dom/devicestorage/ipc/test_ipc.html ?
Right, if you run from dom/devicestorage/ we will run the device storage tests in ipc.
If I run from dom/devicestorage we'll run them twice: once in ipc and once normally. The normal runs pass for me in a clean build, but only if they happen after the ipc runs.
The FileUpdateDispatcher converts file-watcher-notify observer events to file-watcher-update events. This is used to be able to broadcast events from one child to another child in B2G. (f.e., if one child decides to add a file, we want to be able to able to send a onchange notifications to every other child watching that device storage object). In the non-ipc case, we were not ensuring that this object was created. The result was that test_watch.html in the non-ipc case would hang until something wrote/deleted a file using device storage.
Attachment #713050 - Flags: review?(bzbarsky)
Comment on attachment 713050 [details] [diff] [review] patch v.1 Please add a comment that indicates that this GetSingleton() might be the only thing that creates the object. Maybe just put most of comment 4 in your checkin comment?
Attachment #713050 - Flags: review?(bzbarsky) → review+
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Comment on attachment 713050 [details] [diff] [review] patch v.1 [Approval Request Comment] The Gaia e-mail app unit tests would like to be able to use DeviceStorage change notifications in its unit tests to assert on events triggering which run against mozilla-b2g18 builds for realism. This very minor fix (which made unit tests work!) allows DeviceStorage onchange notifications to work in a non-IPC contexts (Which is how the tests run). Since the fix is just triggering the creation of a singleton and that already happens in the primary B2G case, this patch should not impact primary use cases.
Attachment #713050 - Flags: approval-mozilla-b2g18?
Comment on attachment 713050 [details] [diff] [review] patch v.1 Impacts Debug only builds,approving for uplift
Attachment #713050 - Flags: approval-mozilla-b2g18? → approval-mozilla-b2g18+
landed on mozilla-b2g18: https://hg.mozilla.org/releases/mozilla-b2g18/rev/e4e74a2d5189 Thank you for the prompt approval!
You need to log in before you can comment on or make changes to this bug.