]> source.dussan.org Git - jquery-ui.git/commitdiff
tabs: core ajax unit test - more refactoring, seems IE7 needs a quick setTimeout...
authorRichard D. Worth <rdworth@gmail.com>
Fri, 2 Apr 2010 16:43:22 +0000 (12:43 -0400)
committerRichard D. Worth <rdworth@gmail.com>
Fri, 2 Apr 2010 16:43:22 +0000 (12:43 -0400)
tests/unit/tabs/tabs_core.js

index 641f1f2e17e695d4ce51ce45e99a38ecaaffa4f8..652788bba76da3030215031dd9e4ab1dfa237c81 100644 (file)
@@ -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);
                }
        });