mozilla/talkilla — pull request #103 by Standard8 (2013-06-04 14:36:17+00:00)
Title: In chat window tests, stub the WebRTCCall model to speed up test times

Some of the tests happen to call the WebRTCCall.initialize function as a side-effect of the functions that are being tested, even though we're not explicitly testing the initialize function.

The initialize function contains calls to mozRTCPeerConnection, which are relatively expensive. This was found via a quick profile of the test functions.

By stubbing the WebRTCCall.initialize function, test times for chatWindow.html are reduced from around 4.5 second down to about 1.5 seconds on my machine.

There's possibly a bit more to be had in the WebRTCCall itself, but that's for another day.