You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/unit/dimensions.js
+24-16Lines changed: 24 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -258,21 +258,25 @@ test("child of a hidden elem (or unconnected node) has accurate inner/outer/Widt
258
258
equal($divChild.outerWidth(),$divNormal.outerWidth(),"child of a hidden element outerWidth() is wrong see #9441");
259
259
equal($divChild.outerWidth(true),$divNormal.outerWidth(true),"child of a hidden element outerWidth( true ) is wrong see #9300");
260
260
261
-
equal($divChild.height(),$divNormal.height(),"child of a hidden element height() is wrong see #9441");
262
-
equal($divChild.innerHeight(),$divNormal.innerHeight(),"child of a hidden element innerHeight() is wrong see #9441");
263
-
equal($divChild.outerHeight(),$divNormal.outerHeight(),"child of a hidden element outerHeight() is wrong see #9441");
264
-
equal($divChild.outerHeight(true),$divNormal.outerHeight(true),"child of a hidden element outerHeight( true ) is wrong see #9300");
261
+
// Support: IE 10-11, Edge
262
+
// Child height is not always decimal
263
+
equal($divChild.height().toFixed(3),$divNormal.height().toFixed(3),"child of a hidden element height() is wrong see #9441");
264
+
equal($divChild.innerHeight().toFixed(3),$divNormal.innerHeight().toFixed(3),"child of a hidden element innerHeight() is wrong see #9441");
265
+
equal($divChild.outerHeight().toFixed(3),$divNormal.outerHeight().toFixed(3),"child of a hidden element outerHeight() is wrong see #9441");
266
+
equal($divChild.outerHeight(true).toFixed(3),$divNormal.outerHeight(true).toFixed(3),"child of a hidden element outerHeight( true ) is wrong see #9300");
265
267
266
268
// tests that child div of an unconnected div works the same as a normal div
267
269
equal($divUnconnected.width(),$divNormal.width(),"unconnected element width() is wrong see #9441");
268
270
equal($divUnconnected.innerWidth(),$divNormal.innerWidth(),"unconnected element innerWidth() is wrong see #9441");
269
271
equal($divUnconnected.outerWidth(),$divNormal.outerWidth(),"unconnected element outerWidth() is wrong see #9441");
270
272
equal($divUnconnected.outerWidth(true),$divNormal.outerWidth(true),"unconnected element outerWidth( true ) is wrong see #9300");
271
273
272
-
equal($divUnconnected.height(),$divNormal.height(),"unconnected element height() is wrong see #9441");
273
-
equal($divUnconnected.innerHeight(),$divNormal.innerHeight(),"unconnected element innerHeight() is wrong see #9441");
274
-
equal($divUnconnected.outerHeight(),$divNormal.outerHeight(),"unconnected element outerHeight() is wrong see #9441");
275
-
equal($divUnconnected.outerHeight(true),$divNormal.outerHeight(true),"unconnected element outerHeight( true ) is wrong see #9300");
274
+
// Support: IE 10-11, Edge
275
+
// Child height is not always decimal
276
+
equal($divUnconnected.height().toFixed(3),$divNormal.height().toFixed(3),"unconnected element height() is wrong see #9441");
277
+
equal($divUnconnected.innerHeight().toFixed(3),$divNormal.innerHeight().toFixed(3),"unconnected element innerHeight() is wrong see #9441");
278
+
equal($divUnconnected.outerHeight().toFixed(3),$divNormal.outerHeight().toFixed(3),"unconnected element outerHeight() is wrong see #9441");
279
+
equal($divUnconnected.outerHeight(true).toFixed(3),$divNormal.outerHeight(true).toFixed(3),"unconnected element outerHeight( true ) is wrong see #9300");
276
280
277
281
// teardown html
278
282
$divHiddenParent.remove();
@@ -329,21 +333,25 @@ test("box-sizing:border-box child of a hidden elem (or unconnected node) has acc
329
333
equal($divChild.outerWidth(),$divNormal.outerWidth(),"child of a hidden element outerWidth() is wrong see #10413");
330
334
equal($divChild.outerWidth(true),$divNormal.outerWidth(true),"child of a hidden element outerWidth( true ) is wrong see #10413");
331
335
332
-
equal($divChild.height(),$divNormal.height(),"child of a hidden element height() is wrong see #10413");
333
-
equal($divChild.innerHeight(),$divNormal.innerHeight(),"child of a hidden element innerHeight() is wrong see #10413");
334
-
equal($divChild.outerHeight(),$divNormal.outerHeight(),"child of a hidden element outerHeight() is wrong see #10413");
335
-
equal($divChild.outerHeight(true),$divNormal.outerHeight(true),"child of a hidden element outerHeight( true ) is wrong see #10413");
336
+
// Support: IE 10-11, Edge
337
+
// Child height is not always decimal
338
+
equal($divChild.height().toFixed(3),$divNormal.height().toFixed(3),"child of a hidden element height() is wrong see #10413");
339
+
equal($divChild.innerHeight().toFixed(3),$divNormal.innerHeight().toFixed(3),"child of a hidden element innerHeight() is wrong see #10413");
340
+
equal($divChild.outerHeight().toFixed(3),$divNormal.outerHeight().toFixed(3),"child of a hidden element outerHeight() is wrong see #10413");
341
+
equal($divChild.outerHeight(true).toFixed(3),$divNormal.outerHeight(true).toFixed(3),"child of a hidden element outerHeight( true ) is wrong see #10413");
336
342
337
343
// tests that child div of an unconnected div works the same as a normal div
338
344
equal($divUnconnected.width(),$divNormal.width(),"unconnected element width() is wrong see #10413");
339
345
equal($divUnconnected.innerWidth(),$divNormal.innerWidth(),"unconnected element innerWidth() is wrong see #10413");
340
346
equal($divUnconnected.outerWidth(),$divNormal.outerWidth(),"unconnected element outerWidth() is wrong see #10413");
341
347
equal($divUnconnected.outerWidth(true),$divNormal.outerWidth(true),"unconnected element outerWidth( true ) is wrong see #10413");
342
348
343
-
equal($divUnconnected.height(),$divNormal.height(),"unconnected element height() is wrong see #10413");
344
-
equal($divUnconnected.innerHeight(),$divNormal.innerHeight(),"unconnected element innerHeight() is wrong see #10413");
345
-
equal($divUnconnected.outerHeight(),$divNormal.outerHeight(),"unconnected element outerHeight() is wrong see #10413");
346
-
equal($divUnconnected.outerHeight(true),$divNormal.outerHeight(true),"unconnected element outerHeight( true ) is wrong see #10413");
349
+
// Support: IE 10-11, Edge
350
+
// Child height is not always decimal
351
+
equal($divUnconnected.height().toFixed(3),$divNormal.height().toFixed(3),"unconnected element height() is wrong see #10413");
352
+
equal($divUnconnected.innerHeight().toFixed(3),$divNormal.innerHeight().toFixed(3),"unconnected element innerHeight() is wrong see #10413");
353
+
equal($divUnconnected.outerHeight().toFixed(3),$divNormal.outerHeight().toFixed(3),"unconnected element outerHeight() is wrong see #10413");
354
+
equal($divUnconnected.outerHeight(true).toFixed(3),$divNormal.outerHeight(true).toFixed(3),"unconnected element outerHeight( true ) is wrong see #10413");
0 commit comments