aboutsummaryrefslogtreecommitdiffstats
path: root/tests/unit
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-11-09 12:51:26 -0500
committerScott González <scott.gonzalez@gmail.com>2012-11-09 12:51:26 -0500
commitd44557f50ad7b3c512bdd8bc2ba3eed5672b3b12 (patch)
treef0c387d33a759a7d83dae016981a3fa4b0faa178 /tests/unit
parent84cd214486769a3527b3ab420219c8f9c78f9879 (diff)
downloadjquery-ui-d44557f50ad7b3c512bdd8bc2ba3eed5672b3b12.tar.gz
jquery-ui-d44557f50ad7b3c512bdd8bc2ba3eed5672b3b12.zip
Widget: Removed dual storage of widget instances. Fixes #8801 - Widget: Remove data fallbacks for widget names.
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/widget/widget_core.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index 9180072e3..b0812638a 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -89,9 +89,9 @@ test( "custom selector expression", function() {
});
test( "jQuery usage", function() {
- expect( 16 );
+ expect( 14 );
- var elem, instance, ret, bcInstance,
+ var elem, instance, ret,
shouldCreate = false;
$.widget( "ui.testWidget", {
@@ -134,12 +134,6 @@ test( "jQuery usage", function() {
ret = elem.testWidget( "methodWithParams", "value1", "value2" );
equal( ret, elem, "jQuery object returned from method call" );
- // 1.9 BC for #7810
- // TODO remove
- bcInstance = elem.data("testWidget");
- equal( typeof bcInstance, "object", "instance stored in .data(pluginName)" );
- equal( bcInstance.element[0], elem[0], "element stored on widget" );
-
ret = elem.testWidget( "getterSetterMethod" );
equal( ret, 5, "getter/setter can act as getter" );
ret = elem.testWidget( "getterSetterMethod", 30 );
@@ -837,7 +831,7 @@ test( "_on() to common element", function() {
ok( true, "handler triggered" );
}
});
- var widget = $( "#widget" ).testWidget().data( "testWidget" );
+ var widget = $( "#widget" ).testWidget().data( "ui-testWidget" );
$( "#widget-wrapper" ).testWidget();
widget.destroy();
$( document ).trigger( "customevent" );
@@ -849,7 +843,7 @@ test( "_off() - single event", function() {
$.widget( "ui.testWidget", {} );
var shouldTriggerWidget, shouldTriggerOther,
element = $( "#widget" ),
- widget = element.testWidget().data( "testWidget" );
+ widget = element.testWidget().data( "ui-testWidget" );
widget._on( element, { foo: function() {
ok( shouldTriggerWidget, "foo called from _on" );
}});
@@ -870,7 +864,7 @@ test( "_off() - multiple events", function() {
$.widget( "ui.testWidget", {} );
var shouldTriggerWidget, shouldTriggerOther,
element = $( "#widget" ),
- widget = element.testWidget().data( "testWidget" );
+ widget = element.testWidget().data( "ui-testWidget" );
widget._on( element, {
foo: function() {
ok( shouldTriggerWidget, "foo called from _on" );
@@ -898,7 +892,7 @@ test( "_off() - all events", function() {
$.widget( "ui.testWidget", {} );
var shouldTriggerWidget, shouldTriggerOther,
element = $( "#widget" ),
- widget = element.testWidget().data( "testWidget" );
+ widget = element.testWidget().data( "ui-testWidget" );
widget._on( element, {
foo: function() {
ok( shouldTriggerWidget, "foo called from _on" );