aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2012-10-24 10:13:14 -0400
committerScott González <scott.gonzalez@gmail.com>2012-10-24 10:13:51 -0400
commit848ab485839b6dd26f2b6c6680141d95cab32ceb (patch)
treeffe5a909df9a53d21378e839bb567ed2ad6b5429 /tests
parentba752cf7eda841ded93688ab3167b5515fa1660c (diff)
downloadjquery-ui-848ab485839b6dd26f2b6c6680141d95cab32ceb.tar.gz
jquery-ui-848ab485839b6dd26f2b6c6680141d95cab32ceb.zip
Widget: Use existing widgetEventPrefix when extending. Fixes #8724 - widgetEventPrefix is lost when extending existing widget.
Diffstat (limited to 'tests')
-rw-r--r--tests/unit/widget/widget_core.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/unit/widget/widget_core.js b/tests/unit/widget/widget_core.js
index 31f2b9ccf..624ccf743 100644
--- a/tests/unit/widget/widget_core.js
+++ b/tests/unit/widget/widget_core.js
@@ -1240,6 +1240,21 @@ test( "redefine deep prototype chain", function() {
delete $.ui.testWidget2;
});
+test( "redefine - widgetEventPrefix", function() {
+ expect( 2 );
+
+ $.widget( "ui.testWidget", {
+ widgetEventPrefix: "test"
+ });
+ equal( $.ui.testWidget.prototype.widgetEventPrefix, "test",
+ "cusotm prefix in original" );
+
+ $.widget( "ui.testWidget", $.ui.testWidget, {} );
+ equal( $.ui.testWidget.prototype.widgetEventPrefix, "test",
+ "cusotm prefix in extension" );
+
+});
+
asyncTest( "_delay", function() {
expect( 6 );
var order = 0,