diff options
author | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2006-09-19 09:49:22 +0000 |
---|---|---|
committer | Jörn Zaefferer <joern.zaefferer@gmail.com> | 2006-09-19 09:49:22 +0000 |
commit | b0c3711d3e8bd844d1cfa8569864df1c1f73180a (patch) | |
tree | 5053704e7b38298490b60c826999324eba9c215c /src/ajax | |
parent | 4dcbfc92c391983059b920d2a500c1246869f4c7 (diff) | |
download | jquery-b0c3711d3e8bd844d1cfa8569864df1c1f73180a.tar.gz jquery-b0c3711d3e8bd844d1cfa8569864df1c1f73180a.zip |
Refactored test suite to allow async tests (use stop() before starting an async request, use start() when finished), added test for bug #164
Diffstat (limited to 'src/ajax')
-rw-r--r-- | src/ajax/ajax.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ajax/ajax.js b/src/ajax/ajax.js index 3b1a94922..bd69704de 100644 --- a/src/ajax/ajax.js +++ b/src/ajax/ajax.js @@ -215,6 +215,19 @@ jQuery.extend({ * } * ) * + * @test stop(); + * $.get("data/dashboard.xml", function(xml) { + * var content = []; + * $('tab', xml).each(function(k) { + * // workaround for IE needed here, $(this).text() throws an error + * // content[k] = $.trim(this.firstChild.data) || $(this).text(); + * content[k] = $(this).text(); + * }); + * ok( content[0].match(/blabla/), 'Check first tab' ); + * ok( content[1].match(/blublu/), 'Check second tab' ); + * start(); + * }); + * * @name $.get * @type jQuery * @param String url The URL of the page to load. |