diff options
author | Scott González <scott.gonzalez@gmail.com> | 2013-03-14 15:07:06 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2013-03-14 15:07:06 -0400 |
commit | 23771d38ba9d2663f6db0243c8e992dc7ff6844a (patch) | |
tree | 6345e5bf4901f23f2d0bf59b7a1d37743db37921 /tests/unit/button | |
parent | 38fce3f30478bcfce8ea837d850f63b5560d605a (diff) | |
download | jquery-ui-23771d38ba9d2663f6db0243c8e992dc7ff6844a.tar.gz jquery-ui-23771d38ba9d2663f6db0243c8e992dc7ff6844a.zip |
Revert "Widget: Stop setting ui-state-disabled and aria by default on setting disabled option." This needs to wait for a major release.
This reverts commit 4d67f4f34908a50ef88f95df4103ee001b777e45.
Diffstat (limited to 'tests/unit/button')
-rw-r--r-- | tests/unit/button/button_options.js | 29 |
1 files changed, 11 insertions, 18 deletions
diff --git a/tests/unit/button/button_options.js b/tests/unit/button/button_options.js index 124a8699f..e1931a54e 100644 --- a/tests/unit/button/button_options.js +++ b/tests/unit/button/button_options.js @@ -3,26 +3,19 @@ */ (function($) { -module( "button: options" ); +module("button: options"); -test( "disabled, explicit value", function() { - expect( 9 ); - - var element = $( "#radio01" ).button({ disabled: false }); - deepEqual( element.button( "option", "disabled" ), false, "disabled option set to false" ); - deepEqual( element.prop( "disabled" ), false, "element is disabled" ); - - ok( !element.button( "widget" ).hasClass( "ui-state-disabled" ), "element gets ui-state-disabled" ); - ok( !element.button( "widget" ).hasClass( "ui-button-disabled" ), "element gets ui-button-disabled" ); - - element = $( "#radio02" ).button({ disabled: true }); - - ok( element.button( "widget" ).hasClass( "ui-state-disabled" ), "element gets ui-state-disabled" ); - ok( !element.button( "widget" ).attr( "aria-disabled" ), "element does not get aria-disabled" ); - ok( element.button( "widget" ).hasClass( "ui-button-disabled" ), "element gets ui-button-disabled" ); +test("disabled, explicit value", function() { + expect( 4 ); + $("#radio01").button({ disabled: false }); + deepEqual(false, $("#radio01").button("option", "disabled"), + "disabled option set to false"); + deepEqual(false, $("#radio01").prop("disabled"), "element is disabled"); - deepEqual( element.button( "option", "disabled" ), true, "disabled option set to true" ); - deepEqual( element.prop( "disabled" ), true, "element is not disabled" ); + $("#radio02").button({ disabled: true }); + deepEqual(true, $("#radio02").button("option", "disabled"), + "disabled option set to true"); + deepEqual(true, $("#radio02").prop("disabled"), "element is not disabled"); }); test("disabled, null", function() { |