@@ -134,7 +134,7 @@ test("height(Function(args))", function() {
134
134
} ) ;
135
135
136
136
test ( "innerWidth()" , function ( ) {
137
- expect ( 6 ) ;
137
+ expect ( 6 ) ;
138
138
139
139
var $div , div ,
140
140
$win = jQuery ( window ) ,
@@ -143,19 +143,18 @@ test("innerWidth()", function() {
143
143
equal ( jQuery ( window ) . innerWidth ( ) , $win . width ( ) , "Test on window" ) ;
144
144
equal ( jQuery ( document ) . innerWidth ( ) , $doc . width ( ) , "Test on document" ) ;
145
145
146
- $div = jQuery ( "#nothiddendiv" ) ;
147
- // set styles
146
+ $div = jQuery ( "#nothiddendiv" ) ;
148
147
$div . css ( {
149
148
"margin" : 10 ,
150
149
"border" : "2px solid #fff" ,
151
150
"width" : 30
152
151
} ) ;
153
152
154
- equal ( $div . innerWidth ( ) , 30 , "Test with margin and border" ) ;
155
- $div . css ( "padding" , "20px" ) ;
156
- equal ( $div . innerWidth ( ) , 70 , "Test with margin, border and padding" ) ;
153
+ equal ( $div . innerWidth ( ) , 30 , "Test with margin and border" ) ;
154
+ $div . css ( "padding" , "20px" ) ;
155
+ equal ( $div . innerWidth ( ) , 70 , "Test with margin, border and padding" ) ;
157
156
$div . hide ( ) ;
158
- equal ( $div . innerWidth ( ) , 70 , "Test hidden div" ) ;
157
+ equal ( $div . innerWidth ( ) , 70 , "Test hidden div" ) ;
159
158
160
159
// reset styles
161
160
$div . css ( { "display" : "" , "border" : "" , "padding" : "" , "width" : "" , "height" : "" } ) ;
@@ -166,11 +165,11 @@ test("innerWidth()", function() {
166
165
equal ( div . innerWidth ( ) , 0 , "Make sure that disconnected nodes are handled." ) ;
167
166
168
167
div . remove ( ) ;
169
- QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
168
+ QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
170
169
} ) ;
171
170
172
171
test ( "innerHeight()" , function ( ) {
173
- expect ( 6 ) ;
172
+ expect ( 6 ) ;
174
173
175
174
var $div , div ,
176
175
$win = jQuery ( window ) ,
@@ -179,19 +178,18 @@ test("innerHeight()", function() {
179
178
equal ( jQuery ( window ) . innerHeight ( ) , $win . height ( ) , "Test on window" ) ;
180
179
equal ( jQuery ( document ) . innerHeight ( ) , $doc . height ( ) , "Test on document" ) ;
181
180
182
- $div = jQuery ( "#nothiddendiv" ) ;
183
- // set styles
181
+ $div = jQuery ( "#nothiddendiv" ) ;
184
182
$div . css ( {
185
183
"margin" : 10 ,
186
184
"border" : "2px solid #fff" ,
187
185
"height" : 30
188
186
} ) ;
189
187
190
- equal ( $div . innerHeight ( ) , 30 , "Test with margin and border" ) ;
191
- $div . css ( "padding" , "20px" ) ;
192
- equal ( $div . innerHeight ( ) , 70 , "Test with margin, border and padding" ) ;
188
+ equal ( $div . innerHeight ( ) , 30 , "Test with margin and border" ) ;
189
+ $div . css ( "padding" , "20px" ) ;
190
+ equal ( $div . innerHeight ( ) , 70 , "Test with margin, border and padding" ) ;
193
191
$div . hide ( ) ;
194
- equal ( $div . innerHeight ( ) , 70 , "Test hidden div" ) ;
192
+ equal ( $div . innerHeight ( ) , 70 , "Test hidden div" ) ;
195
193
196
194
// reset styles
197
195
$div . css ( { "display" : "" , "border" : "" , "padding" : "" , "width" : "" , "height" : "" } ) ;
@@ -202,11 +200,11 @@ test("innerHeight()", function() {
202
200
equal ( div . innerHeight ( ) , 0 , "Make sure that disconnected nodes are handled." ) ;
203
201
204
202
div . remove ( ) ;
205
- QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
203
+ QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
206
204
} ) ;
207
205
208
206
test ( "outerWidth()" , function ( ) {
209
- expect ( 11 ) ;
207
+ expect ( 11 ) ;
210
208
211
209
var $div , div ,
212
210
$win = jQuery ( window ) ,
@@ -217,20 +215,20 @@ test("outerWidth()", function() {
217
215
equal ( jQuery ( document ) . outerWidth ( ) , $doc . width ( ) , "Test on document without margin option" ) ;
218
216
equal ( jQuery ( document ) . outerWidth ( true ) , $doc . width ( ) , "Test on document with margin option" ) ;
219
217
220
- $div = jQuery ( "#nothiddendiv" ) ;
221
- $div . css ( "width" , 30 ) ;
222
-
223
- equal ( $div . outerWidth ( ) , 30 , "Test with only width set" ) ;
224
- $div . css ( "padding" , "20px" ) ;
225
- equal ( $div . outerWidth ( ) , 70 , "Test with padding" ) ;
226
- $div . css ( "border" , "2px solid #fff" ) ;
227
- equal ( $div . outerWidth ( ) , 74 , "Test with padding and border" ) ;
228
- $div . css ( "margin" , "10px" ) ;
229
- equal ( $div . outerWidth ( ) , 74 , "Test with padding, border and margin without margin option" ) ;
230
- $div . css ( "position" , "absolute" ) ;
231
- equal ( $div . outerWidth ( true ) , 94 , "Test with padding, border and margin with margin option" ) ;
218
+ $div = jQuery ( "#nothiddendiv" ) ;
219
+ $div . css ( "width" , 30 ) ;
220
+
221
+ equal ( $div . outerWidth ( ) , 30 , "Test with only width set" ) ;
222
+ $div . css ( "padding" , "20px" ) ;
223
+ equal ( $div . outerWidth ( ) , 70 , "Test with padding" ) ;
224
+ $div . css ( "border" , "2px solid #fff" ) ;
225
+ equal ( $div . outerWidth ( ) , 74 , "Test with padding and border" ) ;
226
+ $div . css ( "margin" , "10px" ) ;
227
+ equal ( $div . outerWidth ( ) , 74 , "Test with padding, border and margin without margin option" ) ;
228
+ $div . css ( "position" , "absolute" ) ;
229
+ equal ( $div . outerWidth ( true ) , 94 , "Test with padding, border and margin with margin option" ) ;
232
230
$div . hide ( ) ;
233
- equal ( $div . outerWidth ( true ) , 94 , "Test hidden div with padding, border and margin with margin option" ) ;
231
+ equal ( $div . outerWidth ( true ) , 94 , "Test hidden div with padding, border and margin with margin option" ) ;
234
232
235
233
// reset styles
236
234
$div . css ( { "position" : "" , "display" : "" , "border" : "" , "padding" : "" , "width" : "" , "height" : "" } ) ;
@@ -241,7 +239,7 @@ test("outerWidth()", function() {
241
239
equal ( div . outerWidth ( ) , 0 , "Make sure that disconnected nodes are handled." ) ;
242
240
243
241
div . remove ( ) ;
244
- QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
242
+ QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
245
243
} ) ;
246
244
247
245
test ( "child of a hidden elem (or unconnected node) has accurate inner/outer/Width()/Height() see #9441 #9300" , function ( ) {
@@ -353,7 +351,7 @@ test("box-sizing:border-box child of a hidden elem (or unconnected node) has acc
353
351
} ) ;
354
352
355
353
test ( "outerHeight()" , function ( ) {
356
- expect ( 11 ) ;
354
+ expect ( 11 ) ;
357
355
358
356
var $div , div ,
359
357
$win = jQuery ( window ) ,
@@ -364,19 +362,19 @@ test("outerHeight()", function() {
364
362
equal ( jQuery ( document ) . outerHeight ( ) , $doc . height ( ) , "Test on document without margin option" ) ;
365
363
equal ( jQuery ( document ) . outerHeight ( true ) , $doc . height ( ) , "Test on document with margin option" ) ;
366
364
367
- $div = jQuery ( "#nothiddendiv" ) ;
368
- $div . css ( "height" , 30 ) ;
369
-
370
- equal ( $div . outerHeight ( ) , 30 , "Test with only width set" ) ;
371
- $div . css ( "padding" , "20px" ) ;
372
- equal ( $div . outerHeight ( ) , 70 , "Test with padding" ) ;
373
- $div . css ( "border" , "2px solid #fff" ) ;
374
- equal ( $div . outerHeight ( ) , 74 , "Test with padding and border" ) ;
375
- $div . css ( "margin" , "10px" ) ;
376
- equal ( $div . outerHeight ( ) , 74 , "Test with padding, border and margin without margin option" ) ;
377
- equal ( $div . outerHeight ( true ) , 94 , "Test with padding, border and margin with margin option" ) ;
365
+ $div = jQuery ( "#nothiddendiv" ) ;
366
+ $div . css ( "height" , 30 ) ;
367
+
368
+ equal ( $div . outerHeight ( ) , 30 , "Test with only width set" ) ;
369
+ $div . css ( "padding" , "20px" ) ;
370
+ equal ( $div . outerHeight ( ) , 70 , "Test with padding" ) ;
371
+ $div . css ( "border" , "2px solid #fff" ) ;
372
+ equal ( $div . outerHeight ( ) , 74 , "Test with padding and border" ) ;
373
+ $div . css ( "margin" , "10px" ) ;
374
+ equal ( $div . outerHeight ( ) , 74 , "Test with padding, border and margin without margin option" ) ;
375
+ equal ( $div . outerHeight ( true ) , 94 , "Test with padding, border and margin with margin option" ) ;
378
376
$div . hide ( ) ;
379
- equal ( $div . outerHeight ( true ) , 94 , "Test hidden div with padding, border and margin with margin option" ) ;
377
+ equal ( $div . outerHeight ( true ) , 94 , "Test hidden div with padding, border and margin with margin option" ) ;
380
378
381
379
// reset styles
382
380
$div . css ( { "display" : "" , "border" : "" , "padding" : "" , "width" : "" , "height" : "" } ) ;
@@ -387,7 +385,7 @@ test("outerHeight()", function() {
387
385
equal ( div . outerHeight ( ) , 0 , "Make sure that disconnected nodes are handled." ) ;
388
386
389
387
div . remove ( ) ;
390
- QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
388
+ QUnit . expectJqData ( this , $div [ 0 ] , "olddisplay" ) ;
391
389
} ) ;
392
390
393
391
test ( "passing undefined is a setter #5571" , function ( ) {
0 commit comments