Skip to content
Permalink
Browse files

Merge branch 'master' into menubar

Conflicts:
	ui/jquery.ui.menu.js
  • Loading branch information
jzaefferer committed Apr 26, 2011
2 parents f7d2fdb + 325ee6e commit cd61fb1b55cc0f7cc2dc206170b1d95381edad9d
Showing with 600 additions and 772 deletions.
  1. +0 −172 tests/static/menu/all-menus-icons.html
  2. +0 −39 tests/static/menu/default.html
  3. +1 −1 tests/unit/accordion/accordion.html
  4. +14 −14 tests/unit/accordion/accordion_core.js
  5. +6 −1 tests/unit/accordion/accordion_defaults.js
  6. +8 −1 tests/unit/accordion/accordion_defaults_deprecated.js
  7. +1 −1 tests/unit/accordion/accordion_deprecated.html
  8. +99 −99 tests/unit/accordion/accordion_deprecated.js
  9. +29 −29 tests/unit/accordion/accordion_events.js
  10. +13 −13 tests/unit/accordion/accordion_methods.js
  11. +111 −111 tests/unit/accordion/accordion_options.js
  12. +24 −18 tests/unit/autocomplete/autocomplete_defaults.js
  13. +12 −13 tests/unit/button/button_defaults.js
  14. +33 −34 tests/unit/dialog/dialog_defaults.js
  15. +2 −2 tests/unit/dialog/dialog_options.js
  16. +10 −11 tests/unit/menu/menu_defaults.js
  17. +9 −10 tests/unit/progressbar/progressbar_defaults.js
  18. +18 −19 tests/unit/slider/slider_defaults.js
  19. +14 −15 tests/unit/spinner/spinner_defaults.js
  20. +13 −1 tests/unit/tabs/tabs.html
  21. +16 −0 tests/unit/tabs/tabs_core.js
  22. +6 −3 tests/unit/tabs/tabs_defaults.js
  23. +13 −10 tests/unit/tabs/tabs_defaults_deprecated.js
  24. +13 −1 tests/unit/tabs/tabs_deprecated.html
  25. +3 −58 tests/unit/tabs/tabs_methods.js
  26. +13 −1 tests/unit/tabs/tabs_options.js
  27. +0 −62 tests/unit/tabs/tabs_tickets.js
  28. +13 −14 tests/unit/tooltip/tooltip_defaults.js
  29. +3 −0 tests/unit/widget/widget_core.js
  30. +41 −3 tests/visual/menu/menu.html
  31. +12 −1 tests/visual/menu/popup.js
  32. +12 −5 themes/base/jquery.ui.menu.css
  33. +10 −1 ui/jquery.ui.accordion.js
  34. +10 −1 ui/jquery.ui.autocomplete.js
  35. +9 −4 ui/jquery.ui.menu.js
  36. +5 −3 ui/jquery.ui.tabs.js
  37. +4 −1 ui/jquery.ui.widget.js

This file was deleted.

This file was deleted.

@@ -20,7 +20,7 @@
<script src="../testsuite.js"></script>

<script>
function state( accordion ) {
function accordion_state( accordion ) {
var expected = $.makeArray( arguments ).slice( 1 );
var actual = accordion.find( ".ui-accordion-content" ).map(function() {
return $( this ).css( "display" ) === "none" ? 0 : 1;
@@ -4,46 +4,46 @@ module( "accordion: core", accordionSetupTeardown() );

$.each( { div: "#list1", ul: "#navigation", dl: "#accordion-dl" }, function( type, selector ) {
test( "markup structure: " + type, function() {
var ac = $( selector ).accordion();
ok( ac.hasClass( "ui-accordion" ), "main element is .ui-accordion" );
equal( ac.find( ".ui-accordion-header" ).length, 3,
var element = $( selector ).accordion();
ok( element.hasClass( "ui-accordion" ), "main element is .ui-accordion" );
equal( element.find( ".ui-accordion-header" ).length, 3,
".ui-accordion-header elements exist, correct number" );
equal( ac.find( ".ui-accordion-content" ).length, 3,
equal( element.find( ".ui-accordion-content" ).length, 3,
".ui-accordion-content elements exist, correct number" );
same( ac.find( ".ui-accordion-header" ).next().get(),
ac.find( ".ui-accordion-content" ).get(),
same( element.find( ".ui-accordion-header" ).next().get(),
element.find( ".ui-accordion-content" ).get(),
"content panels come immediately after headers" );
});
});

test( "handle click on header-descendant", function() {
var ac = $( "#navigation" ).accordion();
var element = $( "#navigation" ).accordion();
$( "#navigation h2:eq(1) a" ).click();
state( ac, 0, 1, 0 );
accordion_state( element, 0, 1, 0 );
});

test( "ui-accordion-heading class added to headers anchor", function() {
expect( 1 );
var ac = $( "#list1" ).accordion();
var anchors = $( ".ui-accordion-heading" );
var element = $( "#list1" ).accordion();
var anchors = element.find( ".ui-accordion-heading" );
equals( anchors.length, 3 );
});

test( "accessibility", function () {
expect( 13 );
var ac = $( "#list1" ).accordion().accordion( "option", "active", 1 );
var headers = $( ".ui-accordion-header" );
var element = $( "#list1" ).accordion().accordion( "option", "active", 1 );
var headers = element.find( ".ui-accordion-header" );

equals( headers.eq( 1 ).attr( "tabindex" ), 0, "active header should have tabindex=0" );
equals( headers.eq( 0 ).attr( "tabindex" ), -1, "inactive header should have tabindex=-1" );
equals( ac.attr( "role" ), "tablist", "main role" );
equals( element.attr( "role" ), "tablist", "main role" );
equals( headers.attr( "role" ), "tab", "tab roles" );
equals( headers.next().attr( "role" ), "tabpanel", "tabpanel roles" );
equals( headers.eq( 1 ).attr( "aria-expanded" ), "true", "active tab has aria-expanded" );
equals( headers.eq( 0 ).attr( "aria-expanded" ), "false", "inactive tab has aria-expanded" );
equals( headers.eq( 1 ).attr( "aria-selected" ), "true", "active tab has aria-selected" );
equals( headers.eq( 0 ).attr( "aria-selected" ), "false", "inactive tab has aria-selected" );
ac.accordion( "option", "active", 0 );
element.accordion( "option", "active", 0 );
equals( headers.eq( 0 ).attr( "aria-expanded" ), "true", "newly active tab has aria-expanded" );
equals( headers.eq( 1 ).attr( "aria-expanded" ), "false", "newly inactive tab has aria-expanded" );
equals( headers.eq( 0 ).attr( "aria-selected" ), "true", "active tab has aria-selected" );
@@ -10,6 +10,11 @@ commonWidgetTests( "accordion", {
icons: {
"activeHeader": "ui-icon-triangle-1-s",
"header": "ui-icon-triangle-1-e"
}
},

// callbacks
activate: null,
beforeActivate: null,
create: null
}
});
@@ -16,6 +16,13 @@ commonWidgetTests( "accordion", {
"headerSelected": "ui-icon-triangle-1-s"
},
navigation: false,
navigationFilter: function() {}
navigationFilter: function() {},

// callbacks
activate: null,
beforeActivate: null,
change: null,
changestart: null,
create: null
}
});
@@ -17,7 +17,7 @@
<script src="../testsuite.js"></script>

<script>
function state( accordion ) {
function accordion_state( accordion ) {
var expected = $.makeArray( arguments ).slice( 1 );
var actual = accordion.find( ".ui-accordion-content" ).map(function() {
return $( this ).css( "display" ) === "none" ? 0 : 1;

0 comments on commit cd61fb1

Please sign in to comment.
You can’t perform that action at this time.