aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJason Bedard <jason+github@jbedard.ca>2018-08-20 21:13:33 -0700
committerGitHub <noreply@github.com>2018-08-20 21:13:33 -0700
commit6153eb0fd401cda90bf2007335cd4338093d38f0 (patch)
tree8b3c3da3b2dce7e4e71569787135169f419d6c4a /test
parentc9aae3565edc840961ecbeee77fb0cb367c46702 (diff)
downloadjquery-6153eb0fd401cda90bf2007335cd4338093d38f0.tar.gz
jquery-6153eb0fd401cda90bf2007335cd4338093d38f0.zip
Tests: use width style instead of SVG width attribute (#4157)
The SVG width attribute seems to not support border-box in iOS7. Closes gh-4155
Diffstat (limited to 'test')
-rw-r--r--test/unit/dimensions.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/unit/dimensions.js b/test/unit/dimensions.js
index 8c7f0752f..ea7793ff9 100644
--- a/test/unit/dimensions.js
+++ b/test/unit/dimensions.js
@@ -355,7 +355,7 @@ QUnit.test( "table dimensions", function( assert ) {
QUnit.test( "SVG dimensions (basic content-box)", function( assert ) {
assert.expect( 8 );
- var svg = jQuery( "<svg width='100' height='100'></svg>" ).appendTo( "#qunit-fixture" );
+ var svg = jQuery( "<svg style='width: 100px; height: 100px;'></svg>" ).appendTo( "#qunit-fixture" );
assert.equal( svg.width(), 100 );
assert.equal( svg.height(), 100 );
@@ -375,7 +375,7 @@ QUnit.test( "SVG dimensions (basic content-box)", function( assert ) {
QUnit.test( "SVG dimensions (content-box)", function( assert ) {
assert.expect( 8 );
- var svg = jQuery( "<svg width='100' height='100' style='box-sizing: content-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
+ var svg = jQuery( "<svg style='width: 100px; height: 100px; box-sizing: content-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
assert.equal( svg.width(), 100 );
assert.equal( svg.height(), 100 );
@@ -395,7 +395,7 @@ QUnit.test( "SVG dimensions (content-box)", function( assert ) {
QUnit.test( "SVG dimensions (border-box)", function( assert ) {
assert.expect( 8 );
- var svg = jQuery( "<svg width='100' height='100' style='box-sizing: border-box; border: 1px solid white; padding: 2px; margin: 3px'></svg>" ).appendTo( "#qunit-fixture" );
+ 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 );