From: jzaefferer Date: Wed, 31 Mar 2010 14:39:16 +0000 (+0200) Subject: Autocomplete unit tests: Replace unreliable setTimeout with gobal ajax event handler X-Git-Tag: 1.8.1~5^2~51 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=88b909b04ec43443514867f83171cbc9760bb638;p=jquery-ui.git Autocomplete unit tests: Replace unreliable setTimeout with gobal ajax event handler --- diff --git a/tests/unit/autocomplete/autocomplete_options.js b/tests/unit/autocomplete/autocomplete_options.js index 6639e9014..c5aa7c961 100644 --- a/tests/unit/autocomplete/autocomplete_options.js +++ b/tests/unit/autocomplete/autocomplete_options.js @@ -120,7 +120,7 @@ function source_test(source, async) { } if (async) { stop(); - setTimeout(result, 100); + $(document).one("ajaxStop", result); } else { result(); }