jquery-ui/tests/unit/core/core.js

29 lines
696 B
JavaScript
Raw Normal View History

2008-09-20 17:42:04 +00:00
/*
* core unit tests
*/
(function($) {
module('jQuery extensions');
test("attr - aria", function() {
expect(6);
var el = $('#aria');
ok(!el.attr('role'), 'role is empty via attr');
equals(el.attr('role', 'tablist').attr('role'), 'tablist', 'role is tablist');
equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined');
el.attr('aria-expanded', true);
equals(el.attr('aria-expanded'), 'true', 'aria expanded is true');
el.removeAttr('aria-expanded');
equals(el.attr('aria-expanded'), undefined, 'aria expanded is undefined after removing');
el.attr('aria-expanded', false);
equals(el.attr('aria-expanded'), 'false', 'aria expanded is false');
});
2008-09-20 17:42:04 +00:00
})(jQuery);