When I changed this my unit tests failed complaining that getSearchEngine wasn't returning a result, apparently the transaction.oncomplete event doesn't contain event.target.result ?