Bug 970336 - test_restrequest.js times out on Android 2.3 emulator; r=rnewman

--HG--
extra : rebase_source : 686beb0c5ccfab3ebde27f554a3fa60439df5e53
extra : amend_source : 787e95b977f4557073f8c30b9e4e97269e6d1572
This commit is contained in:
Gregory Szorc 2014-02-12 17:16:44 -08:00
parent 13cb611078
commit aef1d3b82f

View File

@ -717,8 +717,14 @@ add_test(function test_timeout() {
do_check_eq(error.result, Cr.NS_ERROR_NET_TIMEOUT);
do_check_eq(this.status, this.ABORTED);
_("Closing connection.");
server_connection.close();
// server_connection is undefined on the Android emulator for reasons
// unknown. Yet, we still get here. If this test is refactored, we should
// investigate the reason why the above callback is behaving differently.
if (server_connection) {
_("Closing connection.");
server_connection.close();
}
_("Shutting down server.");
server.stop(run_next_test);
});