aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard D. Worth <rdworth@gmail.com>2010-04-02 12:43:22 -0400
committerRichard D. Worth <rdworth@gmail.com>2010-04-02 12:43:22 -0400
commit9ba45f3b76bba7daeb341b2c44fc1ad17ac412ab (patch)
tree95af0be151bf753341888fe3cdb47c802ff66a55
parent178c3b5b6ea39ccd3c8ebd252857cf0a47e81840 (diff)
downloadjquery-ui-9ba45f3b76bba7daeb341b2c44fc1ad17ac412ab.tar.gz
jquery-ui-9ba45f3b76bba7daeb341b2c44fc1ad17ac412ab.zip
tabs: core ajax unit test - more refactoring, seems IE7 needs a quick setTimeout for the first async test to work on first load
-rw-r--r--tests/unit/tabs/tabs_core.js30
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/unit/tabs/tabs_core.js b/tests/unit/tabs/tabs_core.js
index 641f1f2e1..652788bba 100644
--- a/tests/unit/tabs/tabs_core.js
+++ b/tests/unit/tabs/tabs_core.js
@@ -35,21 +35,21 @@ test('ajax', function() {
selected: 2,
load: function() {
// spinner: default spinner
- start();
- stop();
- equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
- equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
- el.tabs('destroy');
- el.tabs({
- selected: 2,
- spinner: '<img src="spinner.gif" alt="">',
- load: function() {
- // spinner: image
- equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
- equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
- start();
- }
- });
+ setTimeout(function() {
+ equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
+ equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
+ el.tabs('destroy');
+ el.tabs({
+ selected: 2,
+ spinner: '<img src="spinner.gif" alt="">',
+ load: function() {
+ // spinner: image
+ equals($('li:eq(2) > a > span', el).length, 1, "should restore tab markup after spinner is removed");
+ equals($('li:eq(2) > a > span', el).html(), '3', "should restore tab label after spinner is removed");
+ start();
+ }
+ });
+ }, 1);
}
});