tests only: fixing an error when thread_ui_test.js runs on its own due to lack of mock. a=npotb
(cherry picked from commit c54cc92a938245fd7cfa8e0fd5a702c6a49cb04b)