[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/libraries/jquery.ui/tests/unit/core/ -> core.js (source)

   1  /*

   2   * core unit tests

   3   */
   4  (function($) {
   5  
   6  module('jQuery extensions');
   7  
   8  test("attr - aria", function() {
   9      expect(6);
  10  
  11      var el = $('#aria');
  12  
  13      ok(!el.attr('role'), 'role is empty via attr');
  14      equals(el.attr('role', 'tablist').attr('role'), 'tablist', 'role is tablist');
  15  
  16      equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined');
  17  
  18      el.attr('aria-expanded', true);
  19      equals(el.attr('aria-expanded'), 'true', 'aria expanded is true');
  20  
  21      el.removeAttr('aria-expanded');
  22      equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined after removing');
  23  
  24      el.attr('aria-expanded', false);
  25      equals(el.attr('aria-expanded'), 'false', 'aria expanded is false');
  26  });
  27  
  28  })(jQuery);


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7