]> source.dussan.org Git - jquery-ui.git/commitdiff
Autocomplete unit tests: Replace unreliable setTimeout with gobal ajax event handler
authorjzaefferer <joern.zaefferer@gmail.com>
Wed, 31 Mar 2010 14:39:16 +0000 (16:39 +0200)
committerjzaefferer <joern.zaefferer@gmail.com>
Wed, 31 Mar 2010 14:39:16 +0000 (16:39 +0200)
tests/unit/autocomplete/autocomplete_options.js

index 6639e90147884109880369c79f98fe52e2b6e9b9..c5aa7c9615158d8e2ce664ced527991ae8b84e11 100644 (file)
@@ -120,7 +120,7 @@ function source_test(source, async) {
        }
        if (async) {
                stop();
-               setTimeout(result, 100);
+               $(document).one("ajaxStop", result);
        } else {
                result();
        }