aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit/accordion
diff options
context:
space:
mode:
authorJörn Zaefferer <joern.zaefferer@gmail.com>2012-05-30 14:40:03 +0200
committerJörn Zaefferer <joern.zaefferer@gmail.com>2012-05-30 14:41:58 +0200
commite0fe788ee0c0c0d8d23f9d90b9acff713ba1302f (patch)
treec56ad742f11119f9af5f081986d0c53f1e4c7ddc /tests/unit/accordion
parentf5954fcd743079058dd0b2113dca3c029072e4dd (diff)
downloadjquery-ui-e0fe788ee0c0c0d8d23f9d90b9acff713ba1302f.tar.gz
jquery-ui-e0fe788ee0c0c0d8d23f9d90b9acff713ba1302f.zip
Accordion: Update activate and beforeActivate event properties to newPanel/oldPanel (instead of content). Fixes #6840 and #6842
Diffstat (limited to 'tests/unit/accordion')
-rw-r--r--tests/unit/accordion/accordion_events.js46
1 files changed, 23 insertions, 23 deletions
diff --git a/tests/unit/accordion/accordion_events.js b/tests/unit/accordion/accordion_events.js
index 079c71a62..b67f2b26d 100644
--- a/tests/unit/accordion/accordion_events.js
+++ b/tests/unit/accordion/accordion_events.js
@@ -56,11 +56,11 @@ test( "beforeActivate", function() {
element.one( "accordionbeforeactivate", function( event, ui ) {
ok( !( "originalEvent" in event ) );
equal( ui.oldHeader.length, 0 );
- equal( ui.oldContent.length, 0 );
+ equal( ui.oldPanel.length, 0 );
equal( ui.newHeader.length, 1 );
strictEqual( ui.newHeader[ 0 ], headers[ 0 ] );
- equal( ui.newContent.length, 1 );
- strictEqual( ui.newContent[ 0 ], content[ 0 ] );
+ equal( ui.newPanel.length, 1 );
+ strictEqual( ui.newPanel[ 0 ], content[ 0 ] );
state( element, 0, 0, 0 );
});
element.accordion( "option", "active", 0 );
@@ -70,12 +70,12 @@ test( "beforeActivate", function() {
equal( event.originalEvent.type, "click" );
equal( ui.oldHeader.length, 1 );
strictEqual( ui.oldHeader[ 0 ], headers[ 0 ] );
- equal( ui.oldContent.length, 1 );
- strictEqual( ui.oldContent[ 0 ], content[ 0 ] );
+ equal( ui.oldPanel.length, 1 );
+ strictEqual( ui.oldPanel[ 0 ], content[ 0 ] );
equal( ui.newHeader.length, 1 );
strictEqual( ui.newHeader[ 0 ], headers[ 1 ] );
- equal( ui.newContent.length, 1 );
- strictEqual( ui.newContent[ 0 ], content[ 1 ] );
+ equal( ui.newPanel.length, 1 );
+ strictEqual( ui.newPanel[ 0 ], content[ 1 ] );
state( element, 1, 0, 0 );
});
headers.eq( 1 ).click();
@@ -85,10 +85,10 @@ test( "beforeActivate", function() {
ok( !( "originalEvent" in event ) );
equal( ui.oldHeader.length, 1 );
strictEqual( ui.oldHeader[ 0 ], headers[ 1 ] );
- equal( ui.oldContent.length, 1 );
- strictEqual( ui.oldContent[ 0 ], content[ 1 ] );
+ equal( ui.oldPanel.length, 1 );
+ strictEqual( ui.oldPanel[ 0 ], content[ 1 ] );
equal( ui.newHeader.length, 0 );
- equal( ui.newContent.length, 0 );
+ equal( ui.newPanel.length, 0 );
state( element, 0, 1, 0 );
});
element.accordion( "option", "active", false );
@@ -97,11 +97,11 @@ test( "beforeActivate", function() {
element.one( "accordionbeforeactivate", function( event, ui ) {
ok( !( "originalEvent" in event ) );
equal( ui.oldHeader.length, 0 );
- equal( ui.oldContent.length, 0 );
+ equal( ui.oldPanel.length, 0 );
equal( ui.newHeader.length, 1 );
strictEqual( ui.newHeader[ 0 ], headers[ 2 ] );
- equal( ui.newContent.length, 1 );
- strictEqual( ui.newContent[ 0 ], content[ 2 ] );
+ equal( ui.newPanel.length, 1 );
+ strictEqual( ui.newPanel[ 0 ], content[ 2 ] );
event.preventDefault();
state( element, 0, 0, 0 );
});
@@ -120,33 +120,33 @@ test( "activate", function() {
element.one( "accordionactivate", function( event, ui ) {
equal( ui.oldHeader.length, 0 );
- equal( ui.oldContent.length, 0 );
+ equal( ui.oldPanel.length, 0 );
equal( ui.newHeader.length, 1 );
strictEqual( ui.newHeader[ 0 ], headers[ 0 ] );
- equal( ui.newContent.length, 1 );
- strictEqual( ui.newContent[ 0 ], content[ 0 ] );
+ equal( ui.newPanel.length, 1 );
+ strictEqual( ui.newPanel[ 0 ], content[ 0 ] );
});
element.accordion( "option", "active", 0 );
element.one( "accordionactivate", function( event, ui ) {
equal( ui.oldHeader.length, 1 );
strictEqual( ui.oldHeader[ 0 ], headers[ 0 ] );
- equal( ui.oldContent.length, 1 );
- strictEqual( ui.oldContent[ 0 ], content[ 0 ] );
+ equal( ui.oldPanel.length, 1 );
+ strictEqual( ui.oldPanel[ 0 ], content[ 0 ] );
equal( ui.newHeader.length, 1 );
strictEqual( ui.newHeader[ 0 ], headers[ 1 ] );
- equal( ui.newContent.length, 1 );
- strictEqual( ui.newContent[ 0 ], content[ 1 ] );
+ equal( ui.newPanel.length, 1 );
+ strictEqual( ui.newPanel[ 0 ], content[ 1 ] );
});
headers.eq( 1 ).click();
element.one( "accordionactivate", function( event, ui ) {
equal( ui.oldHeader.length, 1 );
strictEqual( ui.oldHeader[ 0 ], headers[ 1 ] );
- equal( ui.oldContent.length, 1 );
- strictEqual( ui.oldContent[ 0 ], content[ 1 ] );
+ equal( ui.oldPanel.length, 1 );
+ strictEqual( ui.oldPanel[ 0 ], content[ 1 ] );
equal( ui.newHeader.length, 0 );
- equal( ui.newContent.length, 0 );
+ equal( ui.newPanel.length, 0 );
});
element.accordion( "option", "active", false );