@@ -40,10 +40,6 @@ var output,
40
40
41
41
jQuery . each ( tests , function ( flags , resultString ) {
42
42
43
- function createList ( ) {
44
- return jQuery . Callbacks ( flags ) ;
45
- }
46
-
47
43
jQuery . each ( filters , function ( filterLabel , filter ) {
48
44
49
45
test ( "jQuery.Callbacks( \"" + flags + "\" ) - " + filterLabel , function ( ) {
@@ -59,7 +55,7 @@ jQuery.each( tests, function( flags, resultString ) {
59
55
60
56
// Basic binding and firing
61
57
output = "X" ;
62
- cblist = createList ( ) ;
58
+ cblist = jQuery . Callbacks ( flags ) ;
63
59
cblist . add ( function ( str ) {
64
60
output += str ;
65
61
} ) ;
@@ -76,7 +72,7 @@ jQuery.each( tests, function( flags, resultString ) {
76
72
77
73
// Basic binding and firing (context, arguments)
78
74
output = "X" ;
79
- cblist = createList ( ) ;
75
+ cblist = jQuery . Callbacks ( flags ) ;
80
76
cblist . add ( function ( ) {
81
77
equals ( this , window , "Basic binding and firing (context)" ) ;
82
78
output += Array . prototype . join . call ( arguments , "" ) ;
@@ -86,7 +82,7 @@ jQuery.each( tests, function( flags, resultString ) {
86
82
87
83
// fireWith with no arguments
88
84
output = "" ;
89
- cblist = createList ( ) ;
85
+ cblist = jQuery . Callbacks ( flags ) ;
90
86
cblist . add ( function ( ) {
91
87
equals ( this , window , "fireWith with no arguments (context is window)" ) ;
92
88
strictEqual ( arguments . length , 0 , "fireWith with no arguments (no arguments)" ) ;
@@ -95,7 +91,7 @@ jQuery.each( tests, function( flags, resultString ) {
95
91
96
92
// Basic binding, removing and firing
97
93
output = "X" ;
98
- cblist = createList ( ) ;
94
+ cblist = jQuery . Callbacks ( flags ) ;
99
95
cblist . add ( outputA ) ;
100
96
cblist . add ( outputB ) ;
101
97
cblist . add ( outputC ) ;
@@ -105,7 +101,7 @@ jQuery.each( tests, function( flags, resultString ) {
105
101
106
102
// Empty
107
103
output = "X" ;
108
- cblist = createList ( ) ;
104
+ cblist = jQuery . Callbacks ( flags ) ;
109
105
cblist . add ( outputA ) ;
110
106
cblist . add ( outputB ) ;
111
107
cblist . add ( outputC ) ;
@@ -115,7 +111,7 @@ jQuery.each( tests, function( flags, resultString ) {
115
111
116
112
// Locking
117
113
output = "X" ;
118
- cblist = createList ( ) ;
114
+ cblist = jQuery . Callbacks ( flags ) ;
119
115
cblist . add ( function ( str ) {
120
116
output += str ;
121
117
} ) ;
@@ -131,7 +127,7 @@ jQuery.each( tests, function( flags, resultString ) {
131
127
132
128
// Ordering
133
129
output = "X" ;
134
- cblist = createList ( ) ;
130
+ cblist = jQuery . Callbacks ( flags ) ;
135
131
cblist . add ( function ( ) {
136
132
cblist . add ( outputC ) ;
137
133
outputA ( ) ;
@@ -153,7 +149,7 @@ jQuery.each( tests, function( flags, resultString ) {
153
149
154
150
// Multiple fire
155
151
output = "X" ;
156
- cblist = createList ( ) ;
152
+ cblist = jQuery . Callbacks ( flags ) ;
157
153
cblist . add ( function ( str ) {
158
154
output += str ;
159
155
} ) ;
0 commit comments