@@ -6,7 +6,7 @@ var functionReturningObj = function(value) { return (function() { return value;
6
6
7
7
test ( "jQuery.attrFix/jQuery.propFix integrity test" , function ( ) {
8
8
expect ( 2 ) ;
9
-
9
+
10
10
// This must be maintained and equal jQuery.attrFix when appropriate
11
11
// Ensure that accidental or erroneous property
12
12
// overwrites don't occur
@@ -52,7 +52,7 @@ test("attr(String)", function() {
52
52
equals ( jQuery ( "<div value='t'></div>" ) . attr ( "value" ) , "t" , "Check setting custom attr named 'value' on a div" ) ;
53
53
equals ( jQuery ( "#form" ) . attr ( "blah" , "blah" ) . attr ( "blah" ) , "blah" , "Set non-existant attribute on a form" ) ;
54
54
equals ( jQuery ( "#foo" ) . attr ( "height" ) , undefined , "Non existent height attribute should return undefined" ) ;
55
-
55
+
56
56
// [7472] & [3113] (form contains an input with name="action" or name="id")
57
57
var extras = jQuery ( "<input name='id' name='name' /><input id='target' name='target' />" ) . appendTo ( "#testForm" ) ;
58
58
equals ( jQuery ( "#form" ) . attr ( "action" , "newformaction" ) . attr ( "action" ) , "newformaction" , "Check that action attribute was changed" ) ;
@@ -62,7 +62,7 @@ test("attr(String)", function() {
62
62
// Bug #3685 (form contains input with name="name")
63
63
equals ( jQuery ( "#testForm" ) . attr ( "name" ) , undefined , "Retrieving name does not retrieve input with name=name" ) ;
64
64
extras . remove ( ) ;
65
-
65
+
66
66
equals ( jQuery ( "#text1" ) . attr ( "maxlength" ) , "30" , "Check for maxlength attribute" ) ;
67
67
equals ( jQuery ( "#text1" ) . attr ( "maxLength" ) , "30" , "Check for maxLength attribute" ) ;
68
68
equals ( jQuery ( "#area1" ) . attr ( "maxLength" ) , "30" , "Check for maxLength attribute" ) ;
@@ -255,7 +255,7 @@ test("attr(String, Object)", function() {
255
255
commentNode = document . createComment ( "some comment" ) ,
256
256
textNode = document . createTextNode ( "some text" ) ,
257
257
obj = { } ;
258
-
258
+
259
259
jQuery . each ( [ commentNode , textNode , attributeNode ] , function ( i , elem ) {
260
260
var $elem = jQuery ( elem ) ;
261
261
$elem . attr ( "nonexisting" , "foo" ) ;
@@ -295,7 +295,7 @@ test("attr(String, Object)", function() {
295
295
j . removeAttr ( "name" ) ;
296
296
297
297
QUnit . reset ( ) ;
298
-
298
+
299
299
// Type
300
300
var type = jQuery ( "#check2" ) . attr ( "type" ) ;
301
301
var thrown = false ;
@@ -457,7 +457,7 @@ test("removeAttr(String)", function() {
457
457
equals ( jQuery ( "#foo" ) . attr ( "style" , "position:absolute;" ) . removeAttr ( "style" ) . attr ( "style" ) , undefined , "Check removing style attribute" ) ;
458
458
equals ( jQuery ( "#form" ) . attr ( "style" , "position:absolute;" ) . removeAttr ( "style" ) . attr ( "style" ) , undefined , "Check removing style attribute on a form" ) ;
459
459
equals ( jQuery ( "#fx-test-group" ) . attr ( "height" , "3px" ) . removeAttr ( "height" ) . css ( "height" ) , "1px" , "Removing height attribute has no effect on height set with style attribute" ) ;
460
-
460
+
461
461
jQuery ( "#check1" ) . removeAttr ( "checked" ) . prop ( "checked" , true ) . removeAttr ( "checked" ) ;
462
462
equals ( document . getElementById ( "check1" ) . checked , false , "removeAttr sets boolean properties to false" ) ;
463
463
jQuery ( "#text1" ) . prop ( "readOnly" , true ) . removeAttr ( "readonly" ) ;
@@ -669,11 +669,11 @@ test("val()", function() {
669
669
var $button = jQuery ( "<button value='foobar'>text</button>" ) . insertAfter ( "#button" ) ;
670
670
equals ( $button . val ( ) , "foobar" , "Value retrieval on a button does not return innerHTML" ) ;
671
671
equals ( $button . val ( "baz" ) . html ( ) , "text" , "Setting the value does not change innerHTML" ) ;
672
-
672
+
673
673
equals ( jQuery ( "<option/>" ) . val ( "test" ) . attr ( "value" ) , "test" , "Setting value sets the value attribute" ) ;
674
674
} ) ;
675
675
676
- if ( "value" in document . createElement ( "meter" ) &&
676
+ if ( "value" in document . createElement ( "meter" ) &&
677
677
"value" in document . createElement ( "progress" ) ) {
678
678
679
679
test ( "val() respects numbers without exception (Bug #9319)" , function ( ) {
@@ -820,7 +820,7 @@ test("val(select) after form.reset() (Bug #2551)", function() {
820
820
same ( jQuery ( "#select3" ) . val ( ) , [ "1" , "2" ] , "Call val() on a multiple=\"multiple\" select" ) ;
821
821
822
822
jQuery ( "#kk" ) . remove ( ) ;
823
- } ) ;
823
+ } ) ;
824
824
825
825
var testAddClass = function ( valueObj ) {
826
826
expect ( 9 ) ;
@@ -852,7 +852,7 @@ var testAddClass = function(valueObj) {
852
852
div . attr ( "class" , "foo" ) ;
853
853
div . addClass ( valueObj ( "bar baz" ) ) ;
854
854
equals ( div . attr ( "class" ) , "foo bar baz" , "Make sure there isn't too much trimming." ) ;
855
-
855
+
856
856
div . removeClass ( ) ;
857
857
div . addClass ( valueObj ( "foo" ) ) . addClass ( valueObj ( "foo" ) )
858
858
equal ( div . attr ( "class" ) , "foo" , "Do not add the same class twice in separate calls." ) ;
@@ -876,11 +876,11 @@ test("addClass(Function)", function() {
876
876
} ) ;
877
877
878
878
test ( "addClass(Function) with incoming value" , function ( ) {
879
- expect ( 45 ) ;
879
+ expect ( 48 ) ;
880
880
var div = jQuery ( "div" ) , old = div . map ( function ( ) {
881
881
return jQuery ( this ) . attr ( "class" ) || "" ;
882
882
} ) ;
883
-
883
+
884
884
div . addClass ( function ( i , val ) {
885
885
if ( this . id !== "_firebugConsole" ) {
886
886
equals ( val , old [ i ] , "Make sure the incoming value is correct." ) ;
@@ -948,7 +948,7 @@ test("removeClass(Function) - simple", function() {
948
948
} ) ;
949
949
950
950
test ( "removeClass(Function) with incoming value" , function ( ) {
951
- expect ( 45 ) ;
951
+ expect ( 48 ) ;
952
952
953
953
var $divs = jQuery ( "div" ) . addClass ( "test" ) , old = $divs . map ( function ( ) {
954
954
return jQuery ( this ) . attr ( "class" ) ;
@@ -1120,7 +1120,7 @@ test("addClass, removeClass, hasClass", function() {
1120
1120
test ( "contents().hasClass() returns correct values" , function ( ) {
1121
1121
expect ( 2 ) ;
1122
1122
1123
- var $div = jQuery ( "<div><span class='foo'></span><!-- comment -->text</div>" ) ,
1123
+ var $div = jQuery ( "<div><span class='foo'></span><!-- comment -->text</div>" ) ,
1124
1124
$contents = $div . contents ( ) ;
1125
1125
1126
1126
ok ( $contents . hasClass ( "foo" ) , "Found 'foo' in $contents" ) ;
0 commit comments