Closed
Bug 1148326
Opened 10 years ago
Closed 7 years ago
latin_test.js: Amend tests for worker.postMessage() transferList arg for |userDict === undefined| situation
Categories
(Firefox OS Graveyard :: Gaia::Keyboard, defect)
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: mnjul, Unassigned)
References
Details
In bug 1102835 I took the advice of Tim [1] and dynamically decided |transferList| argument of worker.postMessage() calls depending on whether user dict blob was |undefined| [2].
However I only wrote tests for the case where user dict blob was not undefined [3], and the behavior of "not transferring |undefined| blob variable" was not tested.
I couldn't write the tests without changing a huge amount of test scripts because of 1148316 -- the non-nullness of |worker| hindered subsequent activateEngineWithState() calls from ending up in expectable engine status.
We'll want to guard the behavior, as failing to Transfer it isn't really obvious as a behavioral error to users.
[1] https://github.com/mozilla-b2g/gaia/pull/28648#discussion_r27263459
[2] https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/js/imes/latin/latin.js#L267 and https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/js/imes/latin/latin.js#L392
[3] https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/test/unit/imes/latin/latin_test.js#L476-L479 and https://github.com/mozilla-b2g/gaia/blob/master/apps/keyboard/test/unit/imes/latin/latin_test.js#L457-L460 and
Comment 1•7 years ago
|
||
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•