Whitespace

This commit is contained in:
Jörn Zaefferer 2011-06-19 14:42:15 +02:00
parent 2d1b9b391e
commit 391282a9ae

View File

@ -89,7 +89,7 @@ test( "jQuery usage", function() {
"parameter passed via .pluginName(methodName, param)" ); "parameter passed via .pluginName(methodName, param)" );
equals( param2, "value2", equals( param2, "value2",
"multiple parameters passed via .pluginName(methodName, param, param)" ); "multiple parameters passed via .pluginName(methodName, param, param)" );
return this; return this;
}, },
getterSetterMethod: function( val ) { getterSetterMethod: function( val ) {
@ -153,9 +153,9 @@ test( "direct usage", function() {
} }
} }
}); });
var elem = $( "<div>" )[ 0 ]; var elem = $( "<div>" )[ 0 ];
shouldCreate = true; shouldCreate = true;
var instance = new $.ui.testWidget( {}, elem ); var instance = new $.ui.testWidget( {}, elem );
shouldCreate = false; shouldCreate = false;
@ -163,7 +163,7 @@ test( "direct usage", function() {
equals( $( elem ).data( "testWidget" ), instance, equals( $( elem ).data( "testWidget" ), instance,
"instance stored in .data(pluginName)" ); "instance stored in .data(pluginName)" );
equals( instance.element[ 0 ], elem, "element stored on widget" ); equals( instance.element[ 0 ], elem, "element stored on widget" );
var ret = instance.methodWithParams( "value1", "value2" ); var ret = instance.methodWithParams( "value1", "value2" );
equals( ret, instance, "plugin returned from method call" ); equals( ret, instance, "plugin returned from method call" );
@ -193,7 +193,7 @@ test( "error handling", function() {
equal( msg, "no such method '_privateMethod' for testWidget widget instance", equal( msg, "no such method '_privateMethod' for testWidget widget instance",
"invalid method call on widget instance" ); "invalid method call on widget instance" );
}; };
$( "<div>" ).testWidget().testWidget( "_privateMethod" ); $( "<div>" ).testWidget().testWidget( "_privateMethod" );
$.error = error; $.error = error;
}); });
@ -444,7 +444,7 @@ test( ".option() - delegate to ._setOptions()", function() {
calls = []; calls = [];
div.testWidget( "option", "foo", "bar" ); div.testWidget( "option", "foo", "bar" );
same( calls, [{ foo: "bar" }], "_setOptions called for single option" ); same( calls, [{ foo: "bar" }], "_setOptions called for single option" );
calls = []; calls = [];
div.testWidget( "option", { div.testWidget( "option", {
bar: "qux", bar: "qux",
@ -471,7 +471,7 @@ test( ".option() - delegate to ._setOption()", function() {
div.testWidget( "option", "foo", "bar" ); div.testWidget( "option", "foo", "bar" );
same( calls, [{ key: "foo", val: "bar" }], same( calls, [{ key: "foo", val: "bar" }],
"_setOption called for single option" ); "_setOption called for single option" );
calls = []; calls = [];
div.testWidget( "option", { div.testWidget( "option", {
bar: "qux", bar: "qux",
@ -684,14 +684,14 @@ test( "._focusable()", function() {
this._focusable( this.element.children() ); this._focusable( this.element.children() );
} }
}); });
var div = $( "#widget" ).testWidget().children(); var div = $( "#widget" ).testWidget().children();
ok( !div.hasClass( "ui-state-focus" ), "not focused on init" ); ok( !div.hasClass( "ui-state-focus" ), "not focused on init" );
div.trigger( "focusin" ); div.trigger( "focusin" );
ok( div.hasClass( "ui-state-focus" ), "focused after explicit focus" ); ok( div.hasClass( "ui-state-focus" ), "focused after explicit focus" );
div.trigger( "focusout" ); div.trigger( "focusout" );
ok( !div.hasClass( "ui-state-focus" ), "not focused after blur" ); ok( !div.hasClass( "ui-state-focus" ), "not focused after blur" );
div.trigger( "focusin" ); div.trigger( "focusin" );
ok( div.hasClass( "ui-state-focus" ), "focused after explicit focus" ); ok( div.hasClass( "ui-state-focus" ), "focused after explicit focus" );
$( "#widget" ).testWidget( "disable" ); $( "#widget" ).testWidget( "disable" );
@ -700,7 +700,7 @@ test( "._focusable()", function() {
ok( !div.hasClass( "ui-state-focus" ), "can't focus while disabled" ); ok( !div.hasClass( "ui-state-focus" ), "can't focus while disabled" );
$( "#widget" ).testWidget( "enable" ); $( "#widget" ).testWidget( "enable" );
ok( !div.hasClass( "ui-state-focus" ), "enabling doesn't reset focus" ); ok( !div.hasClass( "ui-state-focus" ), "enabling doesn't reset focus" );
div.trigger( "focusin" ); div.trigger( "focusin" );
ok( div.hasClass( "ui-state-focus" ), "focused after explicit focus" ); ok( div.hasClass( "ui-state-focus" ), "focused after explicit focus" );
$( "#widget" ).testWidget( "destroy" ); $( "#widget" ).testWidget( "destroy" );