aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2012-11-28 11:21:52 -0500
committerMike Sherov <mike.sherov@gmail.com>2012-11-28 11:22:14 -0500
commit37ea7341823e7dfe54f37596b1d054b8a2e5c3de (patch)
treec79f859c7af3caff867d9e29d9b57f0b320298a8 /tests
parentdec844570fae5edf56876b760b9358fde2ecb5e7 (diff)
downloadjquery-ui-37ea7341823e7dfe54f37596b1d054b8a2e5c3de.tar.gz
jquery-ui-37ea7341823e7dfe54f37596b1d054b8a2e5c3de.zip
Button tests: simulated clicks aren't perfect in oldIE and Opera
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/button/button_core.js25
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js
index fb03bb8a0..d53dedf90 100644
--- a/tests/unit/button/button_core.js
+++ b/tests/unit/button/button_core.js
@@ -88,15 +88,20 @@ test("buttonset (rtl)", function() {
ok( set.children("label:eq(2)").is(".ui-button.ui-corner-left:not(.ui-corner-all)") );
});
-test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
- expect( 3 );
-
- $("#check2").button().change( function() {
- var lbl = $( this ).button("widget");
- ok( this.checked, "checked ok" );
- ok( lbl.attr("aria-pressed") === "true", "aria ok" );
- ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
- }).button("widget").simulate("click");
-});
+// TODO: simulated click events don't behave like real click events in IE
+// remove this when simulate properly simulates this
+// see http://yuilibrary.com/projects/yui2/ticket/2528826 fore more info
+if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
+ test( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
+ expect( 3 );
+
+ $("#check2").button().change( function() {
+ var lbl = $( this ).button("widget");
+ ok( this.checked, "checked ok" );
+ ok( lbl.attr("aria-pressed") === "true", "aria ok" );
+ ok( lbl.hasClass("ui-state-active"), "ui-state-active ok" );
+ }).button("widget").simulate("mousedown").simulate("click").simulate("mouseup");
+ });
+}
})(jQuery);