aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-29 09:08:48 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-29 09:19:05 -0500
commit948f874266271f6e02a5e9d88691742291fdd269 (patch)
tree675673730ebd848bc54612a653417fe280faff2d /tests
parent37ea7341823e7dfe54f37596b1d054b8a2e5c3de (diff)
downloadjquery-ui-948f874266271f6e02a5e9d88691742291fdd269.tar.gz
jquery-ui-948f874266271f6e02a5e9d88691742291fdd269.zip
Button tests: Work around a quirk in Opera.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/button/button_core.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/tests/unit/button/button_core.js b/tests/unit/button/button_core.js
index d53dedf90..991e4bceb 100644
--- a/tests/unit/button/button_core.js
+++ b/tests/unit/button/button_core.js
@@ -92,7 +92,7 @@ test("buttonset (rtl)", function() {
// 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() {
+ asyncTest( "ensure checked and aria after single click on checkbox label button, see #5518", function() {
expect( 3 );
$("#check2").button().change( function() {
@@ -100,7 +100,16 @@ if ( !$.ui.ie || ( document.documentMode && document.documentMode > 8 ) ) {
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");
+ });
+
+ // support: Opera
+ // Opera doesn't trigger a change event when this is done synchronously.
+ // This seems to be a side effect of another test, but until that can be
+ // tracked down, this delay will have to do.
+ setTimeout(function() {
+ $("#check2").button("widget").simulate("click");
+ start();
+ }, 1 );
});
}