aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2019-03-18 18:44:43 +0100
committerGitHub <noreply@github.com>2019-03-18 18:44:43 +0100
commita0abd15b9e5aa9c1f36a9599e6095304825a7b9f (patch)
treeacf1a0e13c8e8fc5108c2a8bd82ca979db1e4ff0 /test
parent0ec25abba212efde462a8abcf3376f50116fd6c4 (diff)
downloadjquery-a0abd15b9e5aa9c1f36a9599e6095304825a7b9f.tar.gz
jquery-a0abd15b9e5aa9c1f36a9599e6095304825a7b9f.zip
CSS: Avoid forcing a reflow in width/height getters unless necessary
Fixes gh-4322 Closes gh-4325 Ref gh-3991 Ref gh-4010 Ref gh-4185 Ref gh-4187
Diffstat (limited to 'test')
-rw-r--r--test/unit/dimensions.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index e5733fc86..3f690cecf 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -397,17 +397,17 @@ QUnit.test( "SVG dimensions (border-box)", function( assert ) {
var svg = jQuery( "<svg style='width: 100px; height: 100px; box-sizing: border-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
- assert.equal( svg.width(), 94 );
- assert.equal( svg.height(), 94 );
+ assert.equal( svg.width(), 94, "width" );
+ assert.equal( svg.height(), 94, "height" );
- assert.equal( svg.innerWidth(), 98 );
- assert.equal( svg.innerHeight(), 98 );
+ assert.equal( svg.innerWidth(), 98, "innerWidth" );
+ assert.equal( svg.innerHeight(), 98, "innerHeight" );
- assert.equal( svg.outerWidth(), 100 );
- assert.equal( svg.outerHeight(), 100 );
+ assert.equal( svg.outerWidth(), 100, "outerWidth" );
+ assert.equal( svg.outerHeight(), 100, "outerHeight" );
- assert.equal( svg.outerWidth( true ), 106 );
- assert.equal( svg.outerHeight( true ), 106 );
+ assert.equal( svg.outerWidth( true ), 106, "outerWidth( true )" );
+ assert.equal( svg.outerHeight( true ), 106, "outerHeight( true )" );
svg.remove();
} );